Merge lp:~jkakar/storm/resultset-expression into lp:storm
Proposed by
Jamu Kakar
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Jamu Kakar | ||||
Proposed branch: | lp:~jkakar/storm/resultset-expression | ||||
Merge into: | lp:storm | ||||
Diff against target: |
104 lines (+46/-5) 2 files modified
storm/store.py (+11/-2) tests/store/base.py (+35/-3) |
||||
To merge this branch: | bzr merge lp:~jkakar/storm/resultset-expression | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Henstridge | Needs Fixing | ||
Guilherme Salgado (community) | Approve | ||
Review via email: mp+16669@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 355. By Jamu Kakar
-
- Change a test using a ResultSet with is_in() to request a specific
column. - 354. By Jamu Kakar
-
- ResultSet is now a subclass of Expr and the compiler is
specialized to generate SQL for it.
This branch makes ResultSet a subclass of Expr. It also adds a
compiler specialization to generate SQL from a ResultSet. This
makes it easy to use a ResultSet as a subselect. Unfortunately, the
changes are not 100% backwards compatible. Code such as this:
result1 = store.find(Foo) is_in(result1) )
result2 = store.find(Foo, Foo.id.
will now result in an OperationalError when run against all
currently supported databases. This is because, before the changes
made in this branch, result1 would have been iterated and yielded
Foo instances. The changes in this branch result in an invalid
query being generated for this case, because the subselect returns
all foo columns, instead of just the id column.
The current behaviour seems a bit odd, so I'm inclined to not worry
about the issue.