-
-
Couldn't load subscription status.
- Fork 33.2k
gh-128505: Expose an interface to sqlite3_file_control #128507
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
e32c372
3f9c1e2
f9eb73d
dc60055
4867672
4bcb82c
c42bbd5
466401c
cc3bed9
773dc5f
e6d299b
bd2a2a9
b376f84
b17f832
8bb3c57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| sqlite Connection objects now expose a method set_file_control, which is a thin wrapper for `sqlite3_file_control https://www.sqlite.org/c3ref/file_control.html`_. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2173,6 +2173,45 @@ pysqlite_connection_create_collation_impl(pysqlite_Connection *self, | |||||
| Py_RETURN_NONE; | ||||||
| } | ||||||
|
|
||||||
| /*[clinic input] | ||||||
| _sqlite3.Connection.set_file_control as pysqlite_connection_set_file_control | ||||||
hashbrowncipher marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| op: int | ||||||
| a SQLITE_FCNTL_ constant | ||||||
hashbrowncipher marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| arg: long | ||||||
hashbrowncipher marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| argument to pass | ||||||
| / | ||||||
| dbname: str = NULL | ||||||
hashbrowncipher marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| database name | ||||||
|
|
||||||
| Invoke a file control method on the database. | ||||||
| [clinic start generated code]*/ | ||||||
|
|
||||||
| static PyObject * | ||||||
| pysqlite_connection_set_file_control_impl(pysqlite_Connection *self, int op, | ||||||
| long arg, const char *dbname) | ||||||
| /*[clinic end generated code: output=d9d2d311892893b6 input=0253798d9514fea2]*/ | ||||||
| { | ||||||
| int rc; | ||||||
| long val = arg; | ||||||
|
||||||
| long val = arg; | |
| int val = arg; |
Footnotes
-
int, notlong↩
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.
Please also address the first part of this remark.
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.
oops! sorry for making you ask twice
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.
Done. I have also removed the SQLITE_FCNTL_TEMPFILENAME and SQLITE_FCNTL_VFSNAME constants. I hope that's alright.
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.
See https://devguide.python.org/documentation/markup/ for help with docs markup.