| Home | Trees | Index | Help |
|
|---|
| Package picalo :: Module Database :: Class _BaseQueryBuilder |
|
InsertQueryBuilder,
SelectQueryBuilder,
UpdateQueryBuilder| Method Summary | |
|---|---|
__init__(self,
tablename,
connection)
| |
Returns the item with the given field name | |
Returns the number of fields in this query | |
Allows dictionary-use of the object to call the add method. | |
__str__(self)
| |
Adds a field/value pair to the statement, optionally skipping the add if the value is None or empty (''). | |
Adds a field/value pair to the statement for the WHERE clause. | |
Executes the SQL statement. | |
Returns the item with the given field name, or the default value if none exists | |
Returns the parameters as they will be sent to the database | |
Returns the query string as it will be sent to the database. | |
Helper method to ensure that special characters are escaped correctly | |
| Method Details |
|---|
__getitem__(self,
field)
Returns the item with the given field name
|
__len__(self)
Returns the number of fields in this query
|
__setitem__(self,
field,
value)
Allows dictionary-use of the object to call the add method. It
always adds the value, even if it is None or empty.
|
add(self, field, value, add_if_empty=True)Adds a field/value pair to the statement, optionally skipping the add if the value is None or empty (''). This method is only valid for update-type queries and is ignored in select queries. |
add_where(self, field, value, add_if_empty=True)Adds a field/value pair to the statement for the WHERE clause. This method is only used in statements where this makes sense (select, update). It is ignored in insert queries. |
execute(self)Executes the SQL statement. This method should be called for insert and update queries. Does *not* commit if transactions are being used. |
get(self, field, default=None)Returns the item with the given field name, or the default value if none exists |
get_parameters(self)Returns the parameters as they will be sent to the database |
get_query_string(self)Returns the query string as it will be sent to the database. |
_format(self, st)Helper method to ensure that special characters are escaped correctly |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Aug 20 05:38:17 2007 | http://epydoc.sf.net |