s.d.Database(object) : class documentation

Part of storm.database View In Hierarchy

Known subclasses: storm.databases.mysql.MySQL, storm.databases.postgres.Postgres, storm.databases.sqlite.SQLite

A database that can be connected to.

This should be subclassed for individual database backends.

Class Variablesconnection_factoryA callable which will take this database and should return an instance of Connection.
Method connect Create a connection to the database.
Method raw_connect Create a raw database connection.
def connect(self, event=None):
Create a connection to the database.

It calls self.connection_factory to allow for ease of customization.

ParameterseventThe event system to broadcast messages with. If not specified, then no events will be broadcast.
ReturnsAn instance of Connection.
def raw_connect(self):
Create a raw database connection.

This is used by Connection objects to connect to the database. It should be overriden in subclasses to do any database-specific connection setup.

ReturnsA DB-API connection object.
API Documentation for storm, generated by pydoctor at 2011-03-15 08:53:51.