Re: [Sqlalchemy-tickets] [sqlalchemy] #2824: Add ability to query column sets as one entity
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-10-07 08:21:55
|
#2824: Add ability to query column sets as one entity
-----------------------------------+-------------------------------
Reporter: vmagamedov | Owner: zzzeek
Type: enhancement | Status: closed
Priority: high | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Comment (by vmagamedov):
> Other tests failed because bundles can't be selected as "single entity".
I think that bundles can work like models: when you querying only one
bundle, query should yield bundles and not keyed tuples with one bundle.
{{{#!python
points = db.session.query(Bundle(Point.x, Point.y)).all()
for point in points:
print point.x, point.y
}}}
Is this possible to implement? At least optionally (overridable in Bundle
subclass)?
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2824#comment:13>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|