Merge lp:~ack/storm/update-returning into lp:storm
Proposed by
Alberto Donato
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jamu Kakar | ||||
Approved revision: | 435 | ||||
Merged at revision: | 434 | ||||
Proposed branch: | lp:~ack/storm/update-returning | ||||
Merge into: | lp:storm | ||||
Diff against target: |
228 lines (+62/-31) 5 files modified
NEWS (+4/-0) storm/databases/postgres.py (+12/-7) storm/expr.py (+4/-2) tests/databases/postgres.py (+41/-21) tests/store/postgres.py (+1/-1) |
||||
To merge this branch: | bzr merge lp:~ack/storm/update-returning | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jamu Kakar (community) | Approve | ||
Free Ekanayaka (community) | Approve | ||
Review via email: mp+96576@code.launchpad.net |
Description of the change
This branch adds support for Returning(
To post a comment you must log in.
Looks good, +1!
[1]
Please update the NEWS file, mentioning this new feature.
[2]
- """Appends the "RETURNING <primary_columns>" suffix to an INSERT.
+ """Appends the "RETURNING <primary_columns>" suffix to an INSERT or UPDATE.
This is slightly inaccurate now, as you can have arbitrary columns. I'd change it to:
"""Appends the "RETURNING <columns>" suffix to an INSERT or UPDATE.
@param expression: ... primary_ columns}
@param columns: The columns to return, if C{None} then C{expression.
will be used.
[3]
+ def __init__(self, expression, columns=None):
In this particular case I'd s/expression/expr/, as the class name is Expr, and
the current convention in the code is to use the name "expr" for instances of Expr.