Re: [Sqlalchemy-tickets] [sqlalchemy] #1418: Flexible deferred interface
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-08-17 20:33:20
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
the challenge here is that when we create this load thing, there's some
kind of object that the internals can query against, which is fast:
{{{
q = query(Entity).options(load(Entity).only("x", "y"))
# then internally, somehow this works:
current_path = PathContext(Entity, "z")
# is "deferred", without us needing to iterate through Entity four times.
# maybe if only() and other methods could load up the full loader strategy
# internally - then we'd do away with the dictionary crap in
StrategizedProperty.
query.context.strategy(current_path)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:10>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|