Exceptions
sqlalchemy_bind_manager.exceptions
sqlalchemy_bind_manager.exceptions.NotInitializedBindError
Raised when a bind object does not exist (i.e. not yet initialized)
Source code in sqlalchemy_bind_manager/exceptions.py
22 23 24 25 26 27 |
|
sqlalchemy_bind_manager.exceptions.UnsupportedBindError
Raised when the internal session handler is given an unsupported bind object.
Usually it happens when Async and Sync implementation are mixed up
(i.e. initializing an AsyncUnitOfWork
instance with a Sync bind)
Source code in sqlalchemy_bind_manager/exceptions.py
30 31 32 33 34 35 36 37 |
|
sqlalchemy_bind_manager.exceptions.InvalidConfigError
Raised when a class is initialized with an invalid configuration and/or parameters.
Source code in sqlalchemy_bind_manager/exceptions.py
40 41 42 43 44 45 |
|
sqlalchemy_bind_manager.exceptions.ModelNotFoundError
Raised when a Repository is not able to find a model using the provided primary key.
Source code in sqlalchemy_bind_manager/exceptions.py
48 49 50 51 52 53 |
|
sqlalchemy_bind_manager.exceptions.InvalidModelError
Raised when an invalid model is passed to a Repository object or class.
i.e.:
- Trying to instantiate a repository with a non SQLAlchemy model
- Trying to save a model belonging to another Repository class
Source code in sqlalchemy_bind_manager/exceptions.py
56 57 58 59 60 61 62 63 64 65 66 |
|
sqlalchemy_bind_manager.exceptions.UnmappedPropertyError
Raised when trying to execute queries using not mapped column names.
(i.e. passing a non-existing column to search_params
or order_by
parameters when invoking find()
)
Source code in sqlalchemy_bind_manager/exceptions.py
69 70 71 72 73 74 75 76 |
|
sqlalchemy_bind_manager.exceptions.RepositoryNotFoundError
Raised when trying to use a repository that has not been registered with the unit of work instance.
Source code in sqlalchemy_bind_manager/exceptions.py
79 80 81 82 83 84 85 |
|