Skip to content

Convert our use of SQLite to use RETURNING clauses#1113

Open
dkfellows wants to merge 5 commits into
masterfrom
returning
Open

Convert our use of SQLite to use RETURNING clauses#1113
dkfellows wants to merge 5 commits into
masterfrom
returning

Conversation

@dkfellows
Copy link
Copy Markdown
Member

@dkfellows dkfellows commented Sep 25, 2023

This changes our Python code to use a RETURNING clause instead of using the lastrowid property, mirroring a change already in the Java code. It also gets rid of DsDatabaseException; plain old DatabaseException should be good enough.

Note that this requires that we are running against a new enough Python to support RETURNING clauses. I don't know if 3.8 is new enough. Works with 3.8 in test.

Note that this requires that we are running against a new enough Python
to support RETURNING clauses.
@dkfellows dkfellows added the minor Not very important label Sep 25, 2023
@Christian-B
Copy link
Copy Markdown
Member

This looks good assuming it works.

Can we also do something similar with rowcount

May also be an idea to convert the DatabaseReader use of fetchone

@coveralls
Copy link
Copy Markdown

coveralls commented Sep 25, 2023

Coverage Status

coverage: 42.358% (+0.07%) from 42.293% when pulling 52802b6 on returning into 0f3b084 on master.

@dkfellows dkfellows marked this pull request as ready for review September 25, 2023 14:38
@dkfellows dkfellows added this to the 7.1.0 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Not very important

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants