Package buildbot :: Package db :: Module dbspec :: Class DBSpec
[frames] | no frames]

Class DBSpec

source code

object --+
         |
        DBSpec

A specification for the database type and other connection parameters.

Instance Methods
 
__init__(self, dbapiName, *connargs, **connkw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_dbapi(self)
Get the dbapi module used for this connection (for things like exceptions and module-global attributes
source code
 
get_sync_connection(self)
Get a synchronous connection to the specified database.
source code
 
get_async_connection_pool(self)
Get an asynchronous (adbapi) connection pool for the specified database.
source code
 
get_maxidle(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
from_url(cls, url, basedir=None)
Parses a URL of the format driver://[username:password@]host:port/database[?args] and returns a DB object representing this URL.
source code
Class Variables
  pool_args = ['max_idle']
Properties

Inherited from object: __class__

Method Details

__init__(self, dbapiName, *connargs, **connkw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

from_url(cls, url, basedir=None)
Class Method

source code 

Parses a URL of the format
  driver://[username:password@]host:port/database[?args]
and returns a DB object representing this URL.  Percent-
substitution will be performed, replacing %(basedir)s with
the basedir argument.

raises ValueError on an invalid URL.

get_sync_connection(self)

source code 

Get a synchronous connection to the specified database. This returns a simple DBAPI connection object.