-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-45243: Expose SQLite connection limits as sqlite3.Connection attributes
#28790
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
bpo-45243: Expose SQLite connection limits as sqlite3.Connection attributes
#28790
Conversation
|
Proposed alternative to #28463. |
e0da443 to
a0c1251
Compare
Modules/_sqlite/connection.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casting the limit macros to void * and back again to int is perhaps a little bit too hackish. But it does allow for a single getter/setter.
a0c1251 to
f4b9fcd
Compare
5ec4adb to
d04794d
Compare
old = con.SQLITE_LIMIT_LENGTH
con.SQLITE_LIMIT_LENGTH = newdoes not look nice to me. If go this way, I would prefer old = con.limit.length
con.limit.length = newBut do we have precedences of such getters and setters in the stdlib? There are also disadvantages in comparison with traditional
|
|
This approach will be more tedious to maintain. I'm closing this in favour of GH-28463. |
https://bugs.python.org/issue45243