Home | Trees | Indices | Help |
---|
|
object --+ | base.DBDriver --+ | SQLServerDriver
|
|||
|
|||
str |
|
||
object |
|
||
list |
|
||
named tuple |
|
||
list |
|
||
list of tuples |
|
||
Inherited from Inherited from Inherited from |
|
|||
Inherited from Inherited from |
|
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
|
|
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.
|
|
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.
|
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
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Mar 14 15:21:06 2016 | http://epydoc.sourceforge.net |