Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review: add missing docstrings
  • Loading branch information
Erlend E. Aasland committed Dec 26, 2020
commit 998a92dda09f85794e266e16261af54bcc847c01
8 changes: 5 additions & 3 deletions Modules/_sqlite/clinic/connection.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ pysqlite_connection_executemany(pysqlite_Connection *self, PyObject *const *args
PyDoc_STRVAR(pysqlite_connection_executescript__doc__,
"executescript($self, sql_script, /)\n"
"--\n"
"\n");
"\n"
"Executes a multiple SQL statements at once. Non-standard.");

#define PYSQLITE_CONNECTION_EXECUTESCRIPT_METHODDEF \
{"executescript", (PyCFunction)pysqlite_connection_executescript, METH_O, pysqlite_connection_executescript__doc__},
Expand Down Expand Up @@ -526,7 +527,8 @@ PyDoc_STRVAR(pysqlite_connection_backup__doc__,
"backup($self, /, target=<unrepresentable>, *, pages=-1, progress=None,\n"
" name=\'main\', sleep=0.25)\n"
"--\n"
"\n");
"\n"
"Makes a backup of the database. Non-standard.");

#define PYSQLITE_CONNECTION_BACKUP_METHODDEF \
{"backup", (PyCFunction)(void(*)(void))pysqlite_connection_backup, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_backup__doc__},
Expand Down Expand Up @@ -722,4 +724,4 @@ pysqlite_connection_exit(pysqlite_Connection *self, PyObject *const *args, Py_ss
#ifndef PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
#define PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
#endif /* !defined(PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF) */
/*[clinic end generated code: output=f0287a1469b2594a input=a9049054013a1b77]*/
/*[clinic end generated code: output=d8f2ae5034cface4 input=a9049054013a1b77]*/
6 changes: 4 additions & 2 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,13 @@ _sqlite3.Connection.executescript as pysqlite_connection_executescript
sql_script as script_obj: object
/

Executes a multiple SQL statements at once. Non-standard.
[clinic start generated code]*/

static PyObject *
pysqlite_connection_executescript(pysqlite_Connection *self,
PyObject *script_obj)
/*[clinic end generated code: output=4c4f9d77aa0ae37d input=d577986d8f6bcaf4]*/
/*[clinic end generated code: output=4c4f9d77aa0ae37d input=c0b14695aa6c81d9]*/
{
_Py_IDENTIFIER(executescript);
PyObject* cursor = 0;
Expand Down Expand Up @@ -1594,14 +1595,15 @@ _sqlite3.Connection.backup as pysqlite_connection_backup
name: str = "main"
sleep: double = 0.250

Makes a backup of the database. Non-standard.
[clinic start generated code]*/

static PyObject *
pysqlite_connection_backup_impl(pysqlite_Connection *self,
pysqlite_Connection *target, int pages,
PyObject *progress, const char *name,
double sleep)
/*[clinic end generated code: output=306a3e6a38c36334 input=c71435ef1b7282a8]*/
/*[clinic end generated code: output=306a3e6a38c36334 input=2f3497ea530144b1]*/
{
int rc;
int callback_error = 0;
Expand Down