summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/default.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-10-03 15:55:04 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-10-04 12:09:29 -0400
commit95d4cd30420414fcede2662aed87b0f2e5a861d4 (patch)
treeb77df1c621fdea15a95a784fae5c76765c117bbd /lib/sqlalchemy/engine/default.py
parent728ce8cc480d0ada690e5a97067cff821b9a65f3 (diff)
downloadsqlalchemy-95d4cd30420414fcede2662aed87b0f2e5a861d4.tar.gz
Enhance "raise" strategy to include "raise_on_sql" option
The "raise_on_sql" option differentiates from "raise" in that firing a lazy loader is OK as long as it does a simple get from identity map. Whereas "raise" is more useful for the case that objects are to be detached. As part of this, refactors the strategy initiation logic a bit so that a LoaderStrategy itself knows what "key" was used to create it, thus allowing variants of a single strategy based on what the "lazy" argument is. To achieve this we have to also get rid of _get_strategy_by_cls(). Everything here is internal with the one exception of an apparently undocumented, but not underscored, "strategy_class" key on relationship(). Though it's not clear what "strategy_class" accomplishes; at this point the strategy system is extensible using Property.strategy_for(). Fixes: #3812 Change-Id: I812ad878ea5cf764e15f6f71cb39eee78a645d88
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
0 files changed, 0 insertions, 0 deletions