Package ais :: Module sqlhelp :: Class select
[hide private]
[frames] | no frames]

Class select

source code

Construct an sql select query

Sometimes it just gets ugly having all that comma and WHERE AND logic in there. This code takes care of that

Instance Methods [hide private]
 
__init__(self, dbType='postgres') source code
 
setorderby(self, field, desc=False)
Make the returned rows come in some order
source code
 
addfield(self, fieldname)
Add a field name to return
source code
 
addwhere(self, boolTest)
Add expressions to chain together with ANDs
source code
 
addfrom(self, tableName)
Which tables the query will pull from
source code
 
setlimit(self, numOfItems)
Set the maximum number of items to return
source code
 
__str__(self)
Return the query as a string
source code