Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

SQLAlchemy related improvements#90

Merged
ThomasJunk merged 6 commits intoringo-framework:masterfrom
g-tom:sqlalchemy_cleanup
Sep 12, 2017
Merged

SQLAlchemy related improvements#90
ThomasJunk merged 6 commits intoringo-framework:masterfrom
g-tom:sqlalchemy_cleanup

Conversation

@g-tom
Copy link
Copy Markdown

@g-tom g-tom commented Sep 7, 2017

This PR is mainly about making use of SQLAlchemy's identity map where possible instead of querying the database over and over again (e379021, 3652271). Additionally some error handling (542295f, 1bea2e7) and cleanup of usage of SQLAlchemy's API (9e24eb7, 509cb4b).

Tom Gottfried added 6 commits September 7, 2017 10:39
get() takes already loaded objects from the sessions identity map,
whereas one() always triggers a database query. Thus, using get()
potentially improves performance. Consequently, changed BaseFactory.load()
to always return None instead of raising NoResultFound.
At least when importing a list of n objects of the same type, this
reduces the queries for modul loading from n to 1.
Adding them again is harmless but superfluous.
@ThomasJunk ThomasJunk merged commit 510e7a7 into ringo-framework:master Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants