class documentation

class DBAPIError(StatementError):

Known subclasses: sqlalchemy.exc.DatabaseError, sqlalchemy.exc.InterfaceError

View In Hierarchy

Raised when the execution of a database operation fails.

Wraps exceptions raised by the DB-API underlying the database operation. Driver-specific implementations of the standard DB-API exception types are wrapped by matching sub-types of SQLAlchemy's DBAPIError when possible. DB-API's Error type maps to DBAPIError in SQLAlchemy, otherwise the names are identical. Note that there is no guarantee that different DB-API implementations will raise the same exception type for any given error condition.

DBAPIError features ~.StatementError.statement and ~.StatementError.params attributes which supply context regarding the specifics of the statement which had an issue, for the typical case when the error was raised within the context of emitting a SQL statement.

The wrapped exception object is available in the ~.StatementError.orig attribute. Its type and properties are DB-API implementation specific.

Class Method instance Undocumented
Method __init__ Undocumented
Method __reduce__ Undocumented
Class Variable code Undocumented
Instance Variable connection​_invalidated Undocumented

Inherited from StatementError:

Instance Variable orig The DBAPI exception object.
Instance Variable params The parameter list being used when this exception occurred.
Instance Variable statement The string SQL statement being invoked when this exception occurred.
Method ​_sql​_message Undocumented
Method add​_detail Undocumented
Instance Variable detail Undocumented
Instance Variable hide​_parameters Undocumented
Instance Variable ismulti Undocumented

Inherited from SQLAlchemyError (via StatementError):

Method __str__ Undocumented
Method __unicode__ Undocumented
Method ​_message Undocumented

Inherited from HasDescriptionCode (via StatementError, SQLAlchemyError):

Method ​_code​_str Undocumented
@classmethod
def instance(cls, statement, params, orig, dbapi_base_err, hide_parameters=False, connection_invalidated=False, dialect=None, ismulti=None):

Undocumented

def __init__(self, statement, params, orig, hide_parameters=False, connection_invalidated=False, code=None, ismulti=None):
def __reduce__(self):
connection_invalidated =

Undocumented