[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:
Erlend Egeberg Aasland 2022-06-25 22:55:17 +02:00 committed by GitHub
parent 125146771c
commit 0a1517dc41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 156 additions and 122 deletions

View file

@ -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]*/