Package picalo :: Module Database :: Class UpdateQueryBuilder
[show private | hide private]
[frames | no frames]

Class UpdateQueryBuilder

_BaseQueryBuilder --+
                    |
                   UpdateQueryBuilder


Helps in building a simple update SQL call. This class is useful when creating SQL from a script, piece by piece. See _Connection.update_query_builder() for more information.
Method Summary
  __init__(self, tablename, connection)
  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.
    Inherited from _BaseQueryBuilder
  __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.
  __str__(self)
  add(self, field, value, add_if_empty)
Adds a field/value pair to the statement, optionally skipping the add if the value is None or empty ('').
  add_where(self, field, value, add_if_empty)
Adds a field/value pair to the statement for the WHERE clause.
  execute(self)
Executes the SQL statement.
  get(self, field, default)
Returns the item with the given field name, or the default value if none exists

Method Details

get_parameters(self)

Returns the parameters as they will be sent to the database
Overrides:
picalo.Database._BaseQueryBuilder.get_parameters

get_query_string(self)

Returns the query string as it will be sent to the database.
Overrides:
picalo.Database._BaseQueryBuilder.get_query_string

Generated by Epydoc 2.1 on Mon Aug 20 05:38:17 2007 http://epydoc.sf.net