~ubuntu-branches/ubuntu/hardy/gnue-common/hardy

« back to all changes in this revision

Viewing changes to doc/technotes/00006.txt

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2005-03-09 11:06:31 UTC
  • Revision ID: james.westby@ubuntu.com-20050309110631-8gvvn39q7tjz1kj6
Tags: upstream-0.5.14
ImportĀ upstreamĀ versionĀ 0.5.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Title: Trigger Extension for datasources
 
2
Status: Current
 
3
Created: 2002-09-04
 
4
 
 
5
Introduction
 
6
------------
 
7
 
 
8
A GDatasource object as defined in GDatasource.py is providing the following
 
9
functions in its trigger namespace:
 
10
 
 
11
- createResultSet(conditions={}, readOnly=0)    load a new resultset into the
 
12
                                                datasource
 
13
 
 
14
- simpleQuery(maskDict)                         load a new resultset into the
 
15
                                                datasource and return that 
 
16
                                                result as an dictionary object
 
17
 
 
18
 
 
19
The following functions are provided in the global trigger namespace too:
 
20
 
 
21
- delete()                                      delete the current record
 
22
 
 
23
- call(name,params)      ***ALPHA***            call a function "name" on the
 
24
                                                current record. This function
 
25
                                                just works in connection with
 
26
                                                appserver as an db backend.
 
27
 
 
28
 
 
29
Examples
 
30
--------    
 
31
1. get the name of a state out of a zip code
 
32
 
 
33
<trigger>
 
34
statezip_datasource.simpleQuery({"zip":"2342"})
 
35
</trigger>