class documentation

class Connectable(object):

Known subclasses: sqlalchemy.engine.base.Connection, sqlalchemy.engine.base.Engine, sqlalchemy.engine.mock.MockConnection

View In Hierarchy

Interface for an object which supports execution of SQL constructs.

The two implementations of .Connectable are _engine.Connection and _engine.Engine.

Connectable must also implement the 'dialect' member which references a .Dialect instance.

Method ​_execute​_clauseelement Undocumented
Method ​_run​_visitor Undocumented
Method connect Return a _engine.Connection object.
Method execute Executes the given construct and returns a _engine.CursorResult.
Method scalar Executes and returns the first column of the first row.
Class Variable engine The _engine.Engine instance referred to by this .Connectable.
def _execute_clauseelement(self, elem, multiparams=None, params=None):
def _run_visitor(self, visitorcallable, element, **kwargs):

Undocumented

def connect(self, **kwargs):

Return a _engine.Connection object.

Depending on context, this may be self if this object is already an instance of _engine.Connection, or a newly procured _engine.Connection if this object is an instance of _engine.Engine.

def execute(self, object_, *multiparams, **params):
Executes the given construct and returns a _engine.CursorResult.
def scalar(self, object_, *multiparams, **params):

Executes and returns the first column of the first row.

The underlying cursor is closed after execution.

engine =

The _engine.Engine instance referred to by this .Connectable.

May be self if this is already an _engine.Engine.