Class DBIHandle[in The DBI Falcon Module.]

DBI connection handle returned by DBIConnect.

class DBIHandle

more...

Summary

close()Close the database handle.
getLastInsertedId()Get the ID of the last record inserted.
sqlExpand()Expands a sql parameter string and its parameters into a complete string.
startTransaction()Start a transaction

Detailed description

DBI connection handle returned by DBIConnect.

You will not instantiate this class directly, instead, you must use DBIConnect.

Methods

close()

Close the database handle.

DBIHandle.close( )

getLastInsertedId()

Get the ID of the last record inserted.

DBIHandle.getLastInsertedId( )

Returns:Integer

This is database dependent but so widely used, it is included in the DBI module. Some databases such as MySQL only support getting the last inserted ID globally in the database server while others like PostgreSQL allow you to get the last inserted ID of any table. Thus, it is suggested that you always supply the sequence id as which to query. DBI drivers such as MySQL are programmed to ignore the extra information and return simply the last ID inserted into the database.

sqlExpand()

Expands a sql parameter string and its parameters into a complete string.

DBIHandle.sqlExpand( sql, ... )

sqlThe string to be expanded.
...The data that must be expanded.
Returns:String

This is what is usually done by engines not supporting binding and positional parameters; :1, :2, :N markers are expanded into properly translated and escaped values taken from the coresponding parameter.

startTransaction()

Start a transaction

DBIHandle.startTransaction( )

Returns: an instance of DBITransaction This method returns a new transaction.

Made with faldoc 2.0.0