Home | Trees | Indices | Help |
---|
|
object --+ | DBDriver
|
|||
|
|||
|
|||
bool |
|
||
db |
|
||
object |
|
||
str |
|
||
|
|||
list of tuples |
|
||
named tuple |
|
||
list |
|
||
list |
|
||
Inherited from |
|
|||
display_name get a displayable name for the driver |
|||
Inherited from |
|
|
|
|
Connect to the actual underlying database, using the driver. Subclasses must provide an implementation of this method. The method must return the result of the real DB API implementation's connect() method. For instance: def do_connect(): dbi = self.get_import() return dbi.connect(host=host, user=user, passwd=password, database=database) There is no need to catch exceptions; the DBDriver class's connect() method handles that.
|
|
Get a bound import for the underlying DB API module. All subclasses must provide an implementation of this method. Here's an example, assuming the real underlying Python DB API module is 'foosql': def get_import(self): import foosql return foosql
|
Get the metadata for the indexes for a table. Returns a list of tuples, one for each index. Each tuple consists of the following: (index_name, [index_columns], description) The tuple elements have the following meanings.
The tuples are named tuples, so the fields may be referenced by the names above or by position. The default implementation of this method returns
|
Return data about the RDBMS: the product name, the version, etc. The result is a named tuple, with the following fields.
|
Get the metadata for a table. Returns a list of tuples, one for each column. Each tuple consists of the following: (column_name, type_string, max_char_size, precision, scale, nullable) The tuple elements have the following meanings.
The tuples are named tuples, so the fields may be referenced by the names above or by position. The default implementation uses the DB API's cursor.description field. Subclasses are free to override this method to produce their own version that uses other means. |
|
|
display_nameget a displayable name for the driver
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Mar 14 15:21:05 2016 | http://epydoc.sourceforge.net |