@@ -310,7 +310,7 @@ Module functions
310310 to avoid data corruption.
311311 See :attr: `threadsafety ` for more information.
312312
313- :param Connection factory:
313+ :param ~sqlite3. Connection factory:
314314 A custom subclass of :class: `Connection ` to create the connection with,
315315 if not the default :class: `Connection ` class.
316316
@@ -337,7 +337,7 @@ Module functions
337337 The default will change to ``False `` in a future Python release.
338338 :type autocommit: bool
339339
340- :rtype: Connection
340+ :rtype: ~sqlite3. Connection
341341
342342 .. audit-event :: sqlite3.connect database sqlite3.connect
343343 .. audit-event :: sqlite3.connect/handle connection_handle sqlite3.connect
@@ -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
@@ -1097,7 +1129,7 @@ Connection objects
10971129 Works even if the database is being accessed by other clients
10981130 or concurrently by the same connection.
10991131
1100- :param Connection target:
1132+ :param ~sqlite3. Connection target:
11011133 The database connection to save the backup to.
11021134
11031135 :param int pages:
@@ -1219,6 +1251,30 @@ Connection objects
12191251 .. _SQLite limit category : https://www.sqlite.org/c3ref/c_limit_attached.html
12201252
12211253
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+
12221278 .. method :: serialize(*, name="main")
12231279
12241280 Serialize a database into a :class: `bytes ` object. For an
0 commit comments