@@ -573,6 +573,38 @@ Module constants
573573 package, a third-party library which used to upstream changes to
574574 :mod: `!sqlite3 `. Today, it carries no meaning or practical value.
575575
576+ .. _sqlite3-dbconfig-constants :
577+
578+ .. data :: SQLITE_DBCONFIG_DEFENSIVE
579+ SQLITE_DBCONFIG_DQS_DDL
580+ SQLITE_DBCONFIG_DQS_DML
581+ SQLITE_DBCONFIG_ENABLE_FKEY
582+ SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
583+ SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
584+ SQLITE_DBCONFIG_ENABLE_QPSG
585+ SQLITE_DBCONFIG_ENABLE_TRIGGER
586+ SQLITE_DBCONFIG_ENABLE_VIEW
587+ SQLITE_DBCONFIG_LEGACY_ALTER_TABLE
588+ SQLITE_DBCONFIG_LEGACY_FILE_FORMAT
589+ SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE
590+ SQLITE_DBCONFIG_RESET_DATABASE
591+ SQLITE_DBCONFIG_TRIGGER_EQP
592+ SQLITE_DBCONFIG_TRUSTED_SCHEMA
593+ SQLITE_DBCONFIG_WRITABLE_SCHEMA
594+
595+ These constants are used for the :meth: `Connection.setconfig `
596+ and :meth: `~Connection.getconfig ` methods.
597+
598+ The availability of these constants varies depending on the version of SQLite
599+ Python was compiled with.
600+
601+ .. versionadded :: 3.12
602+
603+ .. seealso ::
604+
605+ https://www.sqlite.org/c3ref/c_dbconfig_defensive.html
606+ SQLite docs: Database Connection Configuration Options
607+
576608
577609.. _sqlite3-connection-objects :
578610
@@ -1041,19 +1073,37 @@ Connection objects
10411073 (2, 'broccoli pie', 'broccoli cheese onions flour')
10421074 (3, 'pumpkin pie', 'pumpkin sugar flour butter')
10431075
1044- .. method :: load_extension(path, /)
1076+ .. method :: load_extension(path, /, *, entrypoint=None )
10451077
1046- Load an SQLite extension from a shared library located at * path * .
1078+ Load an SQLite extension from a shared library.
10471079 Enable extension loading with :meth: `enable_load_extension ` before
10481080 calling this method.
10491081
1082+ :param str path:
1083+
1084+ The path to the SQLite extension.
1085+
1086+ :param entrypoint:
1087+
1088+ Entry point name.
1089+ If ``None `` (the default),
1090+ SQLite will come up with an entry point name of its own;
1091+ see the SQLite docs `Loading an Extension `_ for details.
1092+
1093+ :type entrypoint: str | None
1094+
10501095 .. audit-event :: sqlite3.load_extension connection,path sqlite3.Connection.load_extension
10511096
10521097 .. versionadded :: 3.2
10531098
10541099 .. versionchanged :: 3.10
10551100 Added the ``sqlite3.load_extension `` auditing event.
10561101
1102+ .. versionadded :: 3.12
1103+ The *entrypoint * parameter.
1104+
1105+ .. _Loading an Extension : https://www.sqlite.org/loadext.html#loading_an_extension_
1106+
10571107 .. method :: iterdump
10581108
10591109 Return an :term: `iterator ` to dump the database as SQL source code.
@@ -1201,6 +1251,30 @@ Connection objects
12011251 .. _SQLite limit category : https://www.sqlite.org/c3ref/c_limit_attached.html
12021252
12031253
1254+ .. method :: getconfig(op, /)
1255+
1256+ Query a boolean connection configuration option.
1257+
1258+ :param int op:
1259+ A :ref: `SQLITE_DBCONFIG code <sqlite3-dbconfig-constants >`.
1260+
1261+ :rtype: bool
1262+
1263+ .. versionadded :: 3.12
1264+
1265+ .. method :: setconfig(op, enable=True, /)
1266+
1267+ Set a boolean connection configuration option.
1268+
1269+ :param int op:
1270+ A :ref: `SQLITE_DBCONFIG code <sqlite3-dbconfig-constants >`.
1271+
1272+ :param bool enable:
1273+ ``True `` if the configuration option should be enabled (default);
1274+ ``False `` if it should be disabled.
1275+
1276+ .. versionadded :: 3.12
1277+
12041278 .. method :: serialize(*, name="main")
12051279
12061280 Serialize a database into a :class: `bytes ` object. For an
0 commit comments