class Connectable(object):
Known subclasses: sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
, sqlalchemy.engine.mock.MockConnection
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 . |
sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
Undocumented
sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
, sqlalchemy.engine.mock.MockConnection
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
.
sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
, sqlalchemy.engine.mock.MockConnection
_engine.CursorResult
.sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
Executes and returns the first column of the first row.
The underlying cursor is closed after execution.
sqlalchemy.engine.base.Connection
, sqlalchemy.engine.base.Engine
, sqlalchemy.engine.mock.MockConnection
The _engine.Engine
instance referred to by this
.Connectable
.
May be self if this is already an _engine.Engine
.