-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from knucklesuganda/fix/alchemy_repository
Working Databases for SQLAlchemy, Redis, and Internal. Added custom specifications that allow users to quickly change Data Storages
- Loading branch information
Showing
61 changed files
with
1,582 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from sqlalchemy.exc import NoResultFound, IntegrityError, SQLAlchemyError | ||
|
||
from assimilator.core.database.exceptions import DataLayerError, NotFoundError, InvalidQueryError | ||
from assimilator.core.patterns.error_wrapper import ErrorWrapper | ||
|
||
|
||
class AlchemyErrorWrapper(ErrorWrapper): | ||
def __init__(self): | ||
super(AlchemyErrorWrapper, self).__init__(error_mappings={ | ||
NoResultFound: NotFoundError, | ||
IntegrityError: InvalidQueryError, | ||
SQLAlchemyError: DataLayerError, | ||
}, default_error=DataLayerError) | ||
|
||
|
||
__all__ = ['AlchemyErrorWrapper'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from assimilator.core.database.repository import * | ||
from assimilator.core.database.specifications import * | ||
from assimilator.core.database.unit_of_work import * | ||
from assimilator.core.database.exceptions import * |
Oops, something went wrong.