# `dbconnection`

The dbconnection module is accessible via the `sqlobject` module.

## Attributes

#### a `__package__`

    'sqlobject'

#### a `TheURIOpener`

    <sqlobject.dbconnection.ConnectionURIOpener object at 0x9b054cc>

## Functions

#### f `makeDebugWriter(connection, loggerName, loglevel)` ...

#### f `registerConnection(self, schemes, builder)` ...

#### f `registerConnectionInstance(self, inst)` ...

#### f `connectionForURI(self, uri, oldUri=False, **args)` ...

#### f `dbConnectionForScheme(self, scheme)` ...

## Classes

#### C `ConsoleWriter(...)` ...

This class contains 2 members.

#### C `LogWriter(...)` ...

This class contains 2 members.

#### C `Boolean(...)` ...

A bool class that also understands some special string keywords (yes/no, true/false, on/off, 1/0)

This class contains 4 members.

#### C `DBConnection(...)` ...

This class contains 7 members.

#### C `ConnWrapper(...)` ...

This represents a SQLObject class that is bound to a specific connection (instances have a connection instance variable, but classes are global, so this is binds the connection variable lazily when a class method is accessed)

This class contains 5 members.

#### C `ConnMethodWrapper(...)` ...

This class contains 5 members.

#### C `DBAPI(...)` ...

Subclass must define a makeConnection() method, which returns a newly-created connection object.

`queryInsertID` must also be defined.

This class contains 35 members.

#### C `Iteration(...)` ...

This class contains 7 members.

#### C `Transaction(...)` ...

This class contains 15 members.

#### C `ConnectionHub(...)` ...

This object serves as a hub for connections, so that you can pass in a ConnectionHub to a SQLObject subclass as though it was a connection, but actually bind a real database connection later. You can also bind connections on a per-thread basis.

You must hang onto the original ConnectionHub instance, as you cannot retrieve it again from the class or instance.

To use the hub, do something like:

    hub = ConnectionHub()
    class MyClass(SQLObject):
        _connection = hub

    hub.threadConnection = connectionFromURI('...')

This class contains 9 members.

#### C `ConnectionURIOpener(...)` ...

This class contains 8 members.

See the source for more information.