3 Static Methods

gets database interface (see conn.readme)
getColumns(qualified= None)
get column names (with table name if qualified)
get table name
_baseSelect(qualified = None)
get SELECT fragment to get rows of object
returns an eligible candidate key based on contents of _dict
_uniqueWhere(conn, kw)
generate a where clause from output of _matchUnique
get a unique obj based on keyword args
get some objs based on keyword args
given the attribute/value pairs in kw, return sql statement, values to be used in a call to conn.execute. If kw is empty, the WHERE text in the sql statement will still be preseverved. Basically useful for constructing ad-hoc queries on a table.
getSomeWhere(*args, **kw)
Allows you to use the operator objects in PyDO.operators to be able to use sql operators other than the implicit AND as used by the other static get methods. The **kw argument is the same as the other static get methods. The *args argument however allows you to combine operators to do operations like OR, NOT, LIKE, etc. For example, the following would get all rows where the last name field was LIKE Ingers%.
obj.getSomeWhere(LIKE(FIELD('last_name'), ('Ingers%')))

The complete list of operators is in (see section 5, page ).

getTupleWhere(opTuple, **kw)
Allows you to use a somewhat Lispish notation for generating SQL queries, like so:
                  ('LIKE', FIELD('last_name'), 'Ingers%'), 
                  ('OR', ('<>', FIELD('id'), 355),
                         ('=', FIELD('id'), 356))))

Strings are used to represent operators rather than the SQLOperator class wrappers used in getSomeWhere(), but the FIELD and SET classes are still useful. The kw argument is treated the same as in getSome() and getSomeWhere().

getSQLWhere(sql, values=())
executes a sql statement to fetch the object type where you supply the where clause (without the WHERE keyword) and values in the case that you bind variables.

do a scatter fetch (a select from more than one table) based on the relation information in objs which is of the form:
   (object, attributes, destinationObject, destinationAttributes),
   (object, attributes, destinationObject, destinationAttributes)

This basically states that objects attributes are a foreign key to destinationObject's destinationAttributes.

For example, if you have User and UserResidence classes, a scatter fetch may be simply:

userObj.scatterFetchSQL( [ (UserResidence, 'USER_OID', User, 'OID') ] )
which if executed would return a list of tuples of: (userObj, userResObj) where userObj.['OID'] == userResObj['USER_OID']

This function returns sql, baseColumnNames, and a modified version of the objs argument.

scatterFetchPost(objs, sql, vals, cols)
handle the execution and processing of a scatter fetch to produce a result list - returns the list of tuples referred to in the docstring of scatterFetchSQL.
scatterFetch(objs, **kw)
see scatterFetchSQL for format of objs and getSome for format of **kw.

new(refetch = None, **kw)
get new object based on kw args, if refetch is true, refetch obj after insert
does simple validation of fields on insert
causes the database connection of this object to commit.
causes the database connection of this object to roll back.