t.d.p.PostgreSQLDBConfig(InteractionBase) : class documentation

Part of twistar.dbconfig.postgres View In Hierarchy

Undocumented

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
7 Method getLastInsertID Using the given txn, get the id of the last inserted row.
14 Method insertArgsToString Convert {'name': value} to an insert "values" string like "(%s,%s,%s)".
20 Method escapeColNames Escape column names for insertion into SQL statement.
24 Method count Get the number of rows in the given table (optionally, that meet the given where criteria).

Inherited from InteractionBase:

Line # Kind Name Docs
0 Class Variable LOG If True, then all queries are logged using twisted.python.log.msg.
0 Class Variable includeBlankInInsert If True, then insert/update queries will include setting object properties that have not be set to null in their respective columns.
24 Method logEncode Encode the given string if necessary for printing to logs.
33 Method log Log the query and any args or kwargs using twisted.python.log.msg if InteractionBase.LOG is True.
47 Method executeOperation Simply makes same twisted.enterprise.dbapi.ConnectionPool.runOperation call, but with call to log function.
56 Method execute Simply makes same twisted.enterprise.dbapi.ConnectionPool.runQuery call, but with call to log function.
65 Method executeTxn Execute given query within the given transaction. Also, makes call to log function.
74 Method select Select rows from a table.
153 Method insert Insert a row into the given table.
190 Method insertMany Insert many values into a table.
222 Method delete Delete from the given tablename.
239 Method update Update a row into the given table.
268 Method valuesToHash Given a row from a database query (values), create a hash using keys from the table schema and values from the given values;
290 Method getSchema Get the schema (in the form of a list of column names) for a given tablename. Use the given transaction if specified.
304 Method insertObj Insert the given object into its table.
323 Method updateObj Update the given object's row in the object's table.
340 Method refreshObj Update the given object based on the information in the object's table.
354 Method whereToString Convert a conditional to the form needed for a query using the DBAPI. For instance, for most DB's question marks in the query string have to be converted to %s. This will vary by database.
370 Method updateArgsToString Convert dictionary of arguments to form needed for DB update query. This method will vary by database driver.
126 Method _doselect Private callback for actual select query call.
Line # Kind Name Docs
24 Method count Get the number of rows in the given table (optionally, that meet the given where criteria).
222 Method delete Delete from the given tablename.
20 Method escapeColNames Escape column names for insertion into SQL statement.
56 Method execute Simply makes same twisted.enterprise.dbapi.ConnectionPool.runQuery call, but with call to log function.
47 Method executeOperation Simply makes same twisted.enterprise.dbapi.ConnectionPool.runOperation call, but with call to log function.
65 Method executeTxn Execute given query within the given transaction. Also, makes call to log function.
7 Method getLastInsertID Using the given txn, get the id of the last inserted row.
290 Method getSchema Get the schema (in the form of a list of column names) for a given tablename. Use the given transaction if specified.
0 Class Variable includeBlankInInsert If True, then insert/update queries will include setting object properties that have not be set to null in their respective columns.
153 Method insert Insert a row into the given table.
14 Method insertArgsToString Convert {'name': value} to an insert "values" string like "(%s,%s,%s)".
190 Method insertMany Insert many values into a table.
304 Method insertObj Insert the given object into its table.
0 Class Variable LOG If True, then all queries are logged using twisted.python.log.msg.
33 Method log Log the query and any args or kwargs using twisted.python.log.msg if InteractionBase.LOG is True.
24 Method logEncode Encode the given string if necessary for printing to logs.
340 Method refreshObj Update the given object based on the information in the object's table.
74 Method select Select rows from a table.
239 Method update Update a row into the given table.
370 Method updateArgsToString Convert dictionary of arguments to form needed for DB update query. This method will vary by database driver.
323 Method updateObj Update the given object's row in the object's table.
268 Method valuesToHash Given a row from a database query (values), create a hash using keys from the table schema and values from the given values;
354 Method whereToString Convert a conditional to the form needed for a query using the DBAPI. For instance, for most DB's question marks in the query string have to be converted to %s. This will vary by database.
126 Method _doselect Private callback for actual select query call.
def getLastInsertID(self, txn):
Using the given txn, get the id of the last inserted row.
ReturnsThe integer id of the last inserted row.
def insertArgsToString(self, vals):
Convert {'name': value} to an insert "values" string like "(%s,%s,%s)".
def escapeColNames(self, colnames):
Escape column names for insertion into SQL statement.
ParameterscolnamesA List of string column names.
ReturnsA List of string escaped column names.
def count(self, tablename, where=None):
Get the number of rows in the given table (optionally, that meet the given where criteria).
ParameterstablenameThe tablename to count rows from.
whereConditional of the same form as the where parameter in DBObject.find.
ReturnsA Deferred that returns the number of rows.
API Documentation for twistar, generated by pydoctor at 2012-06-12 10:00:49.