Use ResultSets in subselects
Bug #337494 reported by
Jonathan Lange
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Wishlist
|
Jamu Kakar |
Bug Description
I think it would be a good idea for is_in to accept a ResultSet and use that ResultSet to perform a query with a subselect.
Conceptually, I'd like to say foo.is_
You can already do this by cheating. You can call _get_select() on the result set, and set 'columns' to the id column.
Related branches
lp://staging/~jkakar/storm/resultselect
Rejected
for merging
into
lp://staging/storm
- James Henstridge: Abstain
- Diff: 117 lines
lp://staging/~jkakar/storm/resultset-expression
Rejected
for merging
into
lp://staging/storm
- James Henstridge: Needs Fixing
- Guilherme Salgado (community): Approve
-
Diff: 104 lines (+46/-5)2 files modifiedstorm/store.py (+11/-2)
tests/store/base.py (+35/-3)
lp://staging/~jkakar/storm/result-set-in-subselects
- Thomas Herve (community): Approve
- Kevin McDermott (community): Approve
-
Diff: 178 lines (+106/-3)2 files modifiedstorm/store.py (+40/-3)
tests/store/base.py (+66/-0)
Changed in storm: | |
assignee: | nobody → jkakar |
importance: | Undecided → Wishlist |
status: | New → In Progress |
Changed in storm: | |
milestone: | none → 0.17 |
Changed in storm: | |
status: | In Progress → Fix Committed |
Changed in storm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've added a select method to ResultSet (and EmptyResultSet), so you
can do this:
result1 = store.find(Foo, Foo.id < 50) is_in(result1. select( Foo.id) ))
result2 = store.find(Foo, Foo.id.