class DBAPIError(StatementError): (source)
Known subclasses: sqlalchemy.exc.DatabaseError
, sqlalchemy.exc.InterfaceError
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 :class:`DBAPIError` when possible. DB-API's ``Error`` type maps to :class:`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. :class:`DBAPIError` features :attr:`~.StatementError.statement` and :attr:`~.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 :attr:`~.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 |
Undocumented |
Inherited from StatementError
:
Method | add |
Undocumented |
Instance Variable | detail |
Undocumented |
Instance Variable | hide |
Undocumented |
Instance Variable | ismulti |
multi parameter passed to repr_params(). None is meaningful. |
Instance Variable | orig |
The original exception that was thrown. |
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 |
Undocumented |
Inherited from SQLAlchemyError
(via StatementError
):
Method | __str__ |
Undocumented |
Method | _message |
Undocumented |
Inherited from HasDescriptionCode
(via StatementError
, SQLAlchemyError
):
Method | _code |
Undocumented |
@classmethod
Optional[ str]
, params: Optional[ _AnyExecuteParams]
, orig: Exception
, dbapi_base_err: Type[ Exception]
, hide_parameters: bool
= False, connection_invalidated: bool
= False, dialect: Optional[ Dialect]
= None, ismulti: Optional[ bool]
= None) -> StatementError
:@classmethod
Optional[ str]
, params: Optional[ _AnyExecuteParams]
, orig: DontWrapMixin
, dbapi_base_err: Type[ Exception]
, hide_parameters: bool
= False, connection_invalidated: bool
= False, dialect: Optional[ Dialect]
= None, ismulti: Optional[ bool]
= None) -> DontWrapMixin
:@classmethod
Optional[ str]
, params: Optional[ _AnyExecuteParams]
, orig: BaseException
, dbapi_base_err: Type[ Exception]
, hide_parameters: bool
= False, connection_invalidated: bool
= False, dialect: Optional[ Dialect]
= None, ismulti: Optional[ bool]
= None) -> BaseException
:(source) ¶
Undocumented
Optional[ str]
, params: Optional[ _AnyExecuteParams]
, orig: BaseException
, hide_parameters: bool
= False, connection_invalidated: bool
= False, code: Optional[ str]
= None, ismulti: Optional[ bool]
= None):
(source)
¶
sqlalchemy.exc.StatementError.__init__
Undocumented
sqlalchemy.exc.HasDescriptionCode.code
sqlalchemy.exc.DatabaseError
, sqlalchemy.exc.InterfaceError
Undocumented