SQLAlchemy 0.5 Documentation - module sqlalchemy.exc

# SQLAlchemy 0.5 Documentation

Multiple Pages | One Page
Version: 0.5.0rc3 Last Updated: 11/07/08 13:55:35

### module sqlalchemy.exc

Exceptions used with SQLAlchemy.

The base exception class is SQLAlchemyError. Exceptions which are raised as a result of DBAPI exceptions are all subclasses of DBAPIError.

### class ArgumentError(SQLAlchemyError)

Raised when an invalid or conflicting function argument is supplied.

This error generally corresponds to construction time state errors.

back to section top

### class CircularDependencyError(SQLAlchemyError)

Raised by topological sorts when a circular dependency is detected

back to section top

### class CompileError(SQLAlchemyError)

Raised when an error occurs during SQL compilation

back to section top

### class ConcurrentModificationError(SQLAlchemyError)

Rows have been modified outside of the unit of work.

back to section top

### class DBAPIError(SQLAlchemyError)

Raised when the execution of a database operation fails.

`DBAPIError` 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.

If the error-raising operation occured in the execution of a SQL statement, that statement and its parameters will be available on the exception object in the `statement` and `params` attributes.

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

def __init__(self, statement, params, orig, connection_invalidated=False)

Construct a new `DBAPIError`.

def instance(cls, statement, params, orig, connection_invalidated=False)
back to section top

### class DataError(DatabaseError)

Wraps a DB-API DataError.

back to section top

### class DatabaseError(DBAPIError)

Wraps a DB-API DatabaseError.

back to section top

### class DisconnectionError(SQLAlchemyError)

A disconnect is detected on a raw DB-API connection.

This error is raised and consumed internally by a connection pool. It can be raised by a `PoolListener` so that the host pool forces a disconnect.

back to section top

### class FlushError(SQLAlchemyError)

A invalid condition was detected during flush().

back to section top

### class IdentifierError(SQLAlchemyError)

Raised when a schema name is beyond the max character limit

back to section top

### class IntegrityError(DatabaseError)

Wraps a DB-API IntegrityError.

back to section top

### class InterfaceError(DBAPIError)

Wraps a DB-API InterfaceError.

back to section top

### class InternalError(DatabaseError)

Wraps a DB-API InternalError.

back to section top

### class InvalidRequestError(SQLAlchemyError)

SQLAlchemy was asked to do something it can't do.

This error generally corresponds to runtime state errors.

back to section top

### class NoReferenceError(InvalidRequestError)

Raised by `ForeignKey` to indicate a reference cannot be resolved.

back to section top

### class NoReferencedColumnError(NoReferenceError)

Raised by `ForeignKey` when the referred `Column` cannot be located.

back to section top

### class NoReferencedTableError(NoReferenceError)

Raised by `ForeignKey` when the referred `Table` cannot be located.

back to section top

### class NoSuchColumnError(KeyError,InvalidRequestError)

A nonexistent column is requested from a `RowProxy`.

back to section top

### class NoSuchTableError(InvalidRequestError)

Table does not exist or is not visible to a connection.

back to section top

### class NotSupportedError(DatabaseError)

Wraps a DB-API NotSupportedError.

back to section top

### class OperationalError(DatabaseError)

Wraps a DB-API OperationalError.

back to section top

### class ProgrammingError(DatabaseError)

Wraps a DB-API ProgrammingError.

back to section top

### class SADeprecationWarning(DeprecationWarning)

Issued once per usage of a deprecated API.

back to section top

### class SAPendingDeprecationWarning(PendingDeprecationWarning)

Issued once per usage of a deprecated API.

back to section top

### class SAWarning(RuntimeWarning)

Issued at runtime.

back to section top

### class SQLAlchemyError(Exception)

Generic error class.

back to section top

### class TimeoutError(SQLAlchemyError)

Raised when a connection pool times out on getting a connection.

back to section top

### class UnboundExecutionError(InvalidRequestError)

SQL was attempted without a database connection to execute it on.

back to section top