mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (#93926)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
62363bfe59
commit
6446592c89
3 changed files with 30 additions and 19 deletions
14
Modules/_sqlite/clinic/connection.c.h
generated
14
Modules/_sqlite/clinic/connection.c.h
generated
|
@ -248,7 +248,9 @@ PyDoc_STRVAR(pysqlite_connection_close__doc__,
|
|||
"close($self, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Closes the connection.");
|
||||
"Close the database connection.\n"
|
||||
"\n"
|
||||
"Any pending transaction is not committed implicitly.");
|
||||
|
||||
#define PYSQLITE_CONNECTION_CLOSE_METHODDEF \
|
||||
{"close", (PyCFunction)pysqlite_connection_close, METH_NOARGS, pysqlite_connection_close__doc__},
|
||||
|
@ -266,7 +268,9 @@ PyDoc_STRVAR(pysqlite_connection_commit__doc__,
|
|||
"commit($self, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Commit the current transaction.");
|
||||
"Commit any pending transaction to the database.\n"
|
||||
"\n"
|
||||
"If there is no open transaction, this method is a no-op.");
|
||||
|
||||
#define PYSQLITE_CONNECTION_COMMIT_METHODDEF \
|
||||
{"commit", (PyCFunction)pysqlite_connection_commit, METH_NOARGS, pysqlite_connection_commit__doc__},
|
||||
|
@ -284,7 +288,9 @@ PyDoc_STRVAR(pysqlite_connection_rollback__doc__,
|
|||
"rollback($self, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Roll back the current transaction.");
|
||||
"Roll back to the start of any pending transaction.\n"
|
||||
"\n"
|
||||
"If there is no open transaction, this method is a no-op.");
|
||||
|
||||
#define PYSQLITE_CONNECTION_ROLLBACK_METHODDEF \
|
||||
{"rollback", (PyCFunction)pysqlite_connection_rollback, METH_NOARGS, pysqlite_connection_rollback__doc__},
|
||||
|
@ -1231,4 +1237,4 @@ exit:
|
|||
#ifndef DESERIALIZE_METHODDEF
|
||||
#define DESERIALIZE_METHODDEF
|
||||
#endif /* !defined(DESERIALIZE_METHODDEF) */
|
||||
/*[clinic end generated code: output=fb8908674e9f25ff input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=8818c1c3ec9425aa input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue