-
Notifications
You must be signed in to change notification settings - Fork 1.3k
query("insert... returning") fails to commit #648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
anandology
added a commit
that referenced
this issue
Jun 24, 2020
The insert ... returning ... query was not getting commited to the db due to a recent change. Issue #648
anandology
added a commit
that referenced
this issue
Jun 24, 2020
This test was getting blocked when tried without the fix in the previous commit. Issue #648
anandology
added a commit
to anandology/webpy
that referenced
this issue
Jun 24, 2020
This test was getting blocked when tried without the fix in the previous commit. Issue webpy#648
anandology
added a commit
to anandology/webpy
that referenced
this issue
Jun 24, 2020
This test was getting blocked when tried without the fix in the previous commit. Issue webpy#648
anandology
added a commit
to anandology/webpy
that referenced
this issue
Jun 24, 2020
This test was getting blocked when tried without the fix in the previous commit. Issue webpy#648
iredmail
pushed a commit
that referenced
this issue
Jun 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
performing db.query("INSERT into sample_table (value) VALUES ('a')" )works as anticipated: data is stored and committed.
performing db.query("INSERT into sample_table (valid) VALUES ('a') RETURNING idx") fails to commit the insert. Data is added to database, idx is indeed returned, but the insert is not committed, so data is not available.
Problem is due to class DB, query() change with introduction self.create_result_set()
Compare web.py 038 db.py line 661:
0.51:
INSERT...RETURNING sets db_cursor.description, which causes 0.51 to perform
return self.create_result_set(db_cursor)
which meansself.ctx.commit()
is never called.It appears (with limited testing) a possible solution may be as simple as replacing:
with:
and allowing it to flow through to
return out
.The text was updated successfully, but these errors were encountered: