mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.11] gh-90016: Reword sqlite3 adapter/converter docs (GH-93095) (#94272)
Also add adapters and converter recipes.
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com.
(cherry picked from commit bd3c1c187e
)
This commit is contained in:
parent
125146771c
commit
0a1517dc41
5 changed files with 156 additions and 122 deletions
10
Modules/_sqlite/clinic/module.c.h
generated
10
Modules/_sqlite/clinic/module.c.h
generated
|
@ -197,10 +197,10 @@ exit:
|
|||
}
|
||||
|
||||
PyDoc_STRVAR(pysqlite_register_adapter__doc__,
|
||||
"register_adapter($module, type, caster, /)\n"
|
||||
"register_adapter($module, type, adapter, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Registers an adapter with sqlite3\'s adapter registry.");
|
||||
"Register a function to adapt Python objects to SQLite values.");
|
||||
|
||||
#define PYSQLITE_REGISTER_ADAPTER_METHODDEF \
|
||||
{"register_adapter", _PyCFunction_CAST(pysqlite_register_adapter), METH_FASTCALL, pysqlite_register_adapter__doc__},
|
||||
|
@ -228,10 +228,10 @@ exit:
|
|||
}
|
||||
|
||||
PyDoc_STRVAR(pysqlite_register_converter__doc__,
|
||||
"register_converter($module, name, converter, /)\n"
|
||||
"register_converter($module, typename, converter, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Registers a converter with sqlite3.");
|
||||
"Register a function to convert SQLite values to Python objects.");
|
||||
|
||||
#define PYSQLITE_REGISTER_CONVERTER_METHODDEF \
|
||||
{"register_converter", _PyCFunction_CAST(pysqlite_register_converter), METH_FASTCALL, pysqlite_register_converter__doc__},
|
||||
|
@ -332,4 +332,4 @@ skip_optional:
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=10c4f942dc9f0c79 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=fe62f28efd8a5c63 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue