apsw-sqlite3mc 3.52.0.0__tar.gz → 3.53.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/MANIFEST.in +0 -7
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/PKG-INFO +2 -2
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/README.rst +1 -1
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/__init__.pyi +68 -5
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/aio.py +1 -5
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/ext.py +2 -2
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/shell.py +36 -5
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/sqlite_extra.json +16 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/__main__.py +3 -1950
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/aiotest.py +243 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/async_meta.py +7 -4
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/extratest.py +8 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/fork_checker.py +1 -1
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/jsonb.py +12 -4
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/mctests.py +5 -1
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/sessiontests.py +95 -0
- apsw_sqlite3mc-3.53.1.0/apsw/tests/shelltest.py +2049 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw_sqlite3mc.egg-info/PKG-INFO +2 -2
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw_sqlite3mc.egg-info/SOURCES.txt +1 -22
- apsw_sqlite3mc-3.53.1.0/checksums +41 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/setup.apsw +2 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/setup.py +188 -254
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/sqlite3/sqlite3.c +2870 -1509
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/apsw.c +59 -57
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/apsw.docstrings +84 -2
- apsw_sqlite3mc-3.53.1.0/src/apswversion.h +1 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/backup.c +8 -3
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/connection.c +15 -3
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/constants.c +19 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/cursor.c +147 -57
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/faultinject.h +224 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/jsonb.c +23 -1
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/session.c +343 -11
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/util.c +15 -10
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/vfs.c +1 -4
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/tools/vend.py +97 -22
- apsw_sqlite3mc-3.52.0.0/checksums +0 -22
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/Makefile.in +0 -301
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/VERSION +0 -1
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/auto.def +0 -25
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/LICENSE +0 -35
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/README.autosetup +0 -11
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/README.md +0 -464
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/autosetup +0 -2544
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/autosetup-config.guess +0 -1815
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/autosetup-config.sub +0 -2354
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/autosetup-find-tclsh +0 -16
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/autosetup-test-tclsh +0 -20
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/cc-db.tcl +0 -15
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/cc-lib.tcl +0 -187
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/cc-shared.tcl +0 -115
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/cc.tcl +0 -758
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/jimsh0.c +0 -24508
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/pkg-config.tcl +0 -168
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/proj.tcl +0 -2549
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/sqlite-config.tcl +0 -2257
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/autosetup/system.tcl +0 -420
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/configure +0 -4
- apsw_sqlite3mc-3.52.0.0/sqlite3/configure/sqlite3.pc.in +0 -13
- apsw_sqlite3mc-3.52.0.0/src/apswversion.h +0 -1
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/LICENSE +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/__main__.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/bestpractice.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/fts5.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/fts5aux.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/fts5query.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/fts_test_strings +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/mcall.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/py.typed +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/speedtest.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/sqlite_extra.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/sqlite_extra_binaries/README.md +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/carray.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/tests/ftstests.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/trace.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw/unicode.py +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw_sqlite3mc.egg-info/dependency_links.txt +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw_sqlite3mc.egg-info/entry_points.txt +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/apsw_sqlite3mc.egg-info/top_level.txt +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/pyproject.toml +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/setup.cfg +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/_unicodedb.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/argparse.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/async.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/blob.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/carray.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/exceptions.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/faultinject.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/fileio_win32.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/fts.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/pyutil.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/sqlite_debug.h +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/statementcache.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/stringconstants.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/testextension.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/traceback.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/unicode.c +0 -0
- {apsw_sqlite3mc-3.52.0.0 → apsw_sqlite3mc-3.53.1.0}/src/vtable.c +0 -0
|
@@ -25,10 +25,3 @@ include README.rst
|
|
|
25
25
|
|
|
26
26
|
include setup.apsw
|
|
27
27
|
|
|
28
|
-
# configure
|
|
29
|
-
include sqlite3/configure/*
|
|
30
|
-
include sqlite3/configure/autosetup/*
|
|
31
|
-
# remove generated detritus
|
|
32
|
-
exclude sqlite3/configure/config.log
|
|
33
|
-
exclude sqlite3/configure/Makefile
|
|
34
|
-
exclude sqlite3/configure/sqlite3.pc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apsw_sqlite3mc
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.53.1.0
|
|
4
4
|
Summary: SQLite3 Multiple Ciphers combined with Another Python SQLite Wrapper
|
|
5
5
|
Home-page: https://github.com/utelle/apsw-sqlite3mc
|
|
6
6
|
Author: Ulrich Telle
|
|
@@ -89,7 +89,7 @@ Setting the key on a new database is the only change needed to your code.
|
|
|
89
89
|
|
|
90
90
|
>>> import apsw
|
|
91
91
|
>>> print(apsw.mc_version)
|
|
92
|
-
SQLite3 Multiple Ciphers 2.
|
|
92
|
+
SQLite3 Multiple Ciphers 2.3.4
|
|
93
93
|
>>> con = apsw.Connection("database.sqlite3")
|
|
94
94
|
>>> con.pragma("key", "my secret passphrase")
|
|
95
95
|
ok
|
|
@@ -59,7 +59,7 @@ Setting the key on a new database is the only change needed to your code.
|
|
|
59
59
|
|
|
60
60
|
>>> import apsw
|
|
61
61
|
>>> print(apsw.mc_version)
|
|
62
|
-
SQLite3 Multiple Ciphers 2.
|
|
62
|
+
SQLite3 Multiple Ciphers 2.3.4
|
|
63
63
|
>>> con = apsw.Connection("database.sqlite3")
|
|
64
64
|
>>> con.pragma("key", "my secret passphrase")
|
|
65
65
|
ok
|
|
@@ -990,8 +990,13 @@ class Blob:
|
|
|
990
990
|
@final
|
|
991
991
|
class ChangesetBuilder:
|
|
992
992
|
"""This object wraps a `sqlite3_changegroup <https://sqlite.org/session/changegroup.html>`__
|
|
993
|
-
|
|
994
|
-
|
|
993
|
+
to build a changeset or patchset. The contents can come from:
|
|
994
|
+
|
|
995
|
+
* Existing changesets
|
|
996
|
+
* Individual :class:`TableChange`
|
|
997
|
+
* :meth:`add_insert`, :meth:`add_update`, :meth:`add_delete`
|
|
998
|
+
|
|
999
|
+
See the :ref:`example <example_changesetbuilder>`"""
|
|
995
1000
|
|
|
996
1001
|
def add(self, changeset: ChangesetInput) -> None:
|
|
997
1002
|
""":param changeset: The changeset as the bytes, or a stream
|
|
@@ -1012,12 +1017,62 @@ class ChangesetBuilder:
|
|
|
1012
1017
|
Calls: `sqlite3changegroup_add_change <https://sqlite.org/session/sqlite3changegroup_add_change.html>`__"""
|
|
1013
1018
|
...
|
|
1014
1019
|
|
|
1020
|
+
def add_delete(self, table: str, indirect: bool, row: SQLiteValues) -> None:
|
|
1021
|
+
"""Adds an ``delete`` change row. You must have called :meth:`schema` first so
|
|
1022
|
+
the table can be verified.
|
|
1023
|
+
|
|
1024
|
+
.. seealso::
|
|
1025
|
+
|
|
1026
|
+
* :meth:`add_insert`
|
|
1027
|
+
* :meth:`add_update`
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
Calls: `sqlite3changegroup_change_begin <https://sqlite.org/session/sqlite3changegroup_change_begin.html>`__
|
|
1031
|
+
Calls: `sqlite3changegroup_change_finish <https://sqlite.org/session/sqlite3changegroup_change_finish.html>`__"""
|
|
1032
|
+
...
|
|
1033
|
+
|
|
1034
|
+
def add_insert(self, table: str, indirect: bool, row: SQLiteValues) -> None:
|
|
1035
|
+
"""Adds an ``insert`` change row. You must have called :meth:`schema` first so
|
|
1036
|
+
the table can be verified.
|
|
1037
|
+
|
|
1038
|
+
.. seealso::
|
|
1039
|
+
|
|
1040
|
+
* :meth:`add_delete`
|
|
1041
|
+
* :meth:`add_update`
|
|
1042
|
+
|
|
1043
|
+
Calls: `sqlite3changegroup_change_begin <https://sqlite.org/session/sqlite3changegroup_change_begin.html>`__
|
|
1044
|
+
Calls: `sqlite3changegroup_change_finish <https://sqlite.org/session/sqlite3changegroup_change_finish.html>`__"""
|
|
1045
|
+
...
|
|
1046
|
+
|
|
1047
|
+
def add_update(self, table: str, indirect: bool, old: SQLiteValues, new: SQLiteValues) -> None:
|
|
1048
|
+
"""Adds an ``update`` change giving old and new rows. You must have called :meth:`schema` first so
|
|
1049
|
+
the table can be verified.
|
|
1050
|
+
|
|
1051
|
+
See `sqlite3changegroup_change_finish <https://sqlite.org/session/sqlite3changegroup_change_finish.html>`__
|
|
1052
|
+
for details on which columns of old and new you must provide values for. Where no value should be
|
|
1053
|
+
provided, use :attr:`apsw.no_change`.
|
|
1054
|
+
|
|
1055
|
+
.. seealso::
|
|
1056
|
+
|
|
1057
|
+
* :meth:`add_insert`
|
|
1058
|
+
* :meth:`add_delete`
|
|
1059
|
+
|
|
1060
|
+
Calls: `sqlite3changegroup_change_begin <https://sqlite.org/session/sqlite3changegroup_change_begin.html>`__
|
|
1061
|
+
Calls: `sqlite3changegroup_change_finish <https://sqlite.org/session/sqlite3changegroup_change_finish.html>`__"""
|
|
1062
|
+
...
|
|
1063
|
+
|
|
1015
1064
|
def close(self) -> None:
|
|
1016
1065
|
"""Releases the builder
|
|
1017
1066
|
|
|
1018
1067
|
Calls: `sqlite3changegroup_delete <https://sqlite.org/session/sqlite3changegroup_delete.html>`__"""
|
|
1019
1068
|
...
|
|
1020
1069
|
|
|
1070
|
+
def config(self, op: int, *args: Any) -> int:
|
|
1071
|
+
"""Configures the changegroup.
|
|
1072
|
+
|
|
1073
|
+
Calls: `sqlite3changegroup_config <https://sqlite.org/session/sqlite3changegroup_config.html>`__"""
|
|
1074
|
+
...
|
|
1075
|
+
|
|
1021
1076
|
def __init__(self):
|
|
1022
1077
|
"""Creates a new empty builder.
|
|
1023
1078
|
|
|
@@ -4465,6 +4520,8 @@ SQLITE_CARRAY_INT64: int = 1
|
|
|
4465
4520
|
"""For `Datatypes for the CARRAY table-valued function <https://sqlite.org/c3ref/c_carray_blob.html>'__"""
|
|
4466
4521
|
SQLITE_CARRAY_TEXT: int = 3
|
|
4467
4522
|
"""For `Datatypes for the CARRAY table-valued function <https://sqlite.org/c3ref/c_carray_blob.html>'__"""
|
|
4523
|
+
SQLITE_CHANGEGROUP_CONFIG_PATCHSET: int = 1
|
|
4524
|
+
"""For `Options for sqlite3changegroup_config() <https://sqlite.org/session/c_changegroup_config_patchset.html>'__"""
|
|
4468
4525
|
SQLITE_CHANGESETAPPLY_FKNOACTION: int = 8
|
|
4469
4526
|
"""For `Flags for sqlite3changeset_apply_v2 <https://sqlite.org/session/c_changesetapply_fknoaction.html>'__"""
|
|
4470
4527
|
SQLITE_CHANGESETAPPLY_IGNORENOOP: int = 4
|
|
@@ -5495,6 +5552,12 @@ SQLITE_NOTADB SQLITE_NOTFOUND SQLITE_NOTICE SQLITE_OK SQLITE_PERM
|
|
|
5495
5552
|
SQLITE_PROTOCOL SQLITE_RANGE SQLITE_READONLY SQLITE_ROW SQLITE_SCHEMA
|
|
5496
5553
|
SQLITE_TOOBIG SQLITE_WARNING"""
|
|
5497
5554
|
|
|
5555
|
+
mapping_session_changegroup_config_options: dict[str | int, int | str]
|
|
5556
|
+
"""Options for sqlite3changegroup_config() mapping names to int and int to names.
|
|
5557
|
+
Doc at https://sqlite.org/session/c_changegroup_config_patchset.html
|
|
5558
|
+
|
|
5559
|
+
SQLITE_CHANGEGROUP_CONFIG_PATCHSET"""
|
|
5560
|
+
|
|
5498
5561
|
mapping_session_changeset_apply_v2_flags: dict[str | int, int | str]
|
|
5499
5562
|
"""Flags for sqlite3changeset_apply_v2 mapping names to int and int to names.
|
|
5500
5563
|
Doc at https://sqlite.org/session/c_changesetapply_fknoaction.html
|
|
@@ -7437,13 +7500,13 @@ class AsyncCursor:
|
|
|
7437
7500
|
* :attr:`Cursor.description_full`
|
|
7438
7501
|
* :attr:`Cursor.description`"""
|
|
7439
7502
|
|
|
7440
|
-
description:
|
|
7503
|
+
description: tuple[tuple[str, str, None, None, None, None, None], ...]
|
|
7441
7504
|
"""Based on the `DB-API cursor property
|
|
7442
7505
|
<https://www.python.org/dev/peps/pep-0249/>`__, this returns the
|
|
7443
7506
|
same as :meth:`get_description` but with 5 Nones appended because
|
|
7444
7507
|
SQLite does not have the information."""
|
|
7445
7508
|
|
|
7446
|
-
description_full:
|
|
7509
|
+
description_full: tuple[tuple[str, str, str, str, str], ...]
|
|
7447
7510
|
"""Only present if SQLITE_ENABLE_COLUMN_METADATA was defined at
|
|
7448
7511
|
compile time.
|
|
7449
7512
|
|
|
@@ -7571,7 +7634,7 @@ class AsyncCursor:
|
|
|
7571
7634
|
"""Returns the :attr:`connection` this cursor is part of"""
|
|
7572
7635
|
...
|
|
7573
7636
|
|
|
7574
|
-
|
|
7637
|
+
def get_description(self) -> tuple[tuple[str, str], ...]:
|
|
7575
7638
|
"""If you are trying to get information about a table or view,
|
|
7576
7639
|
then `pragma table_info <https://sqlite.org/pragma.html#pragma_table_info>`__
|
|
7577
7640
|
is better. If you want to know up front what columns and other
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import asyncio
|
|
5
6
|
import contextlib
|
|
6
7
|
import contextvars
|
|
7
8
|
import logging
|
|
@@ -368,9 +369,6 @@ class AsyncIO:
|
|
|
368
369
|
return await task
|
|
369
370
|
|
|
370
371
|
def __init__(self, *, thread_name: str = "asyncio apsw background worker"):
|
|
371
|
-
global asyncio
|
|
372
|
-
import asyncio
|
|
373
|
-
|
|
374
372
|
self.queue: queue.SimpleQueue[_CallTracker | None] = queue.SimpleQueue()
|
|
375
373
|
self.loop = asyncio.get_running_loop()
|
|
376
374
|
threading.Thread(name=thread_name, target=self.worker_thread_run).start()
|
|
@@ -651,8 +649,6 @@ def Auto() -> Trio | AsyncIO | AnyIO:
|
|
|
651
649
|
|
|
652
650
|
if found is None and "asyncio" in sys.modules:
|
|
653
651
|
try:
|
|
654
|
-
import asyncio
|
|
655
|
-
|
|
656
652
|
asyncio.get_running_loop()
|
|
657
653
|
found = AsyncIO
|
|
658
654
|
except:
|
|
@@ -180,7 +180,7 @@ class TypesConverterCursorFactory:
|
|
|
180
180
|
"""Registers a callable that converts from a SQLite value"""
|
|
181
181
|
self.converters[name] = callable
|
|
182
182
|
|
|
183
|
-
def __call__(self, connection: apsw.Connection) -> TypeConverterCursor:
|
|
183
|
+
def __call__(self, connection: apsw.Connection) -> TypesConverterCursorFactory.TypeConverterCursor:
|
|
184
184
|
"Returns a new convertor :class:`cursor <apsw.Cursor>` for the `connection`"
|
|
185
185
|
return TypesConverterCursorFactory.TypeConverterCursor(connection, self)
|
|
186
186
|
|
|
@@ -2224,7 +2224,7 @@ def get_column_names(row: Any) -> tuple[Sequence[str], VTColumnAccess]:
|
|
|
2224
2224
|
* - Type
|
|
2225
2225
|
- Access
|
|
2226
2226
|
- Column names From
|
|
2227
|
-
* - :
|
|
2227
|
+
* - :func:`dataclasses.is_dataclass`
|
|
2228
2228
|
- :attr:`VTColumnAccess.By_Attr`
|
|
2229
2229
|
- :func:`dataclasses.fields`
|
|
2230
2230
|
* - :func:`isinstance <isinstance>`\(:class:`tuple`) and :func:`hasattr <hasattr>`\(:code:`"_fields"`) - eg :func:`~collections.namedtuple`
|
|
@@ -1922,11 +1922,9 @@ Enter ".help" for instructions
|
|
|
1922
1922
|
def _csvin_wrapper(self, filename, dialect):
|
|
1923
1923
|
# Returns a csv reader that works around python bugs and uses
|
|
1924
1924
|
# dialect dict to configure reader
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
thefile.close()
|
|
1929
|
-
return
|
|
1925
|
+
with open(filename, "r", encoding=self.encoding[0]) as thefile:
|
|
1926
|
+
for line in csv.reader(thefile, **dialect.copy()):
|
|
1927
|
+
yield line
|
|
1930
1928
|
|
|
1931
1929
|
def command_autoimport(self, cmd):
|
|
1932
1930
|
"""autoimport FILENAME ?TABLE?: Imports filename creating a table and automatically working out separators and data types (alternative to .import command)
|
|
@@ -2179,6 +2177,39 @@ Enter ".help" for instructions
|
|
|
2179
2177
|
finally:
|
|
2180
2178
|
self.pop_output()
|
|
2181
2179
|
|
|
2180
|
+
def command_limit(self, cmd):
|
|
2181
|
+
"""limit ?NAME VALUE?: Show all limits, or set a specific one
|
|
2182
|
+
|
|
2183
|
+
With no arguments lists all limits. Supply a name and value to
|
|
2184
|
+
change. For example:
|
|
2185
|
+
|
|
2186
|
+
.limit attached 10
|
|
2187
|
+
"""
|
|
2188
|
+
if len(cmd) == 0:
|
|
2189
|
+
outputs = {}
|
|
2190
|
+
for k in apsw.mapping_limits:
|
|
2191
|
+
if type(k) is not str:
|
|
2192
|
+
continue
|
|
2193
|
+
pretty = k[len("SQLITE_LIMIT_") :].lower()
|
|
2194
|
+
outputs[pretty] = self.db.limit(getattr(apsw, k), -1)
|
|
2195
|
+
w = max(len(k) for k in outputs.keys())
|
|
2196
|
+
for k, v in outputs.items():
|
|
2197
|
+
self.write(self.stdout, " " * (w - len(k)))
|
|
2198
|
+
self.write(self.stdout, k + ": ")
|
|
2199
|
+
self.write_value(v)
|
|
2200
|
+
self.write(self.stdout, "\n")
|
|
2201
|
+
return
|
|
2202
|
+
elif len(cmd) != 2:
|
|
2203
|
+
raise self.Error("Expected zero or two parameters")
|
|
2204
|
+
|
|
2205
|
+
key = "SQLITE_LIMIT_" + cmd[0].upper()
|
|
2206
|
+
if key not in apsw.mapping_limits:
|
|
2207
|
+
raise self.Error(f"Unknown limit option {key}")
|
|
2208
|
+
v = self.db.limit(getattr(apsw, key), int(cmd[1]))
|
|
2209
|
+
self.write(self.stdout, cmd[0].lower() + ": ")
|
|
2210
|
+
self.write_value(v)
|
|
2211
|
+
self.write(self.stdout, "\n")
|
|
2212
|
+
|
|
2182
2213
|
def command_load(self, cmd):
|
|
2183
2214
|
"""load FILE ?ENTRY?: Loads a SQLite extension library
|
|
2184
2215
|
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"description": "A virtual table that returns suggested completions for a partial SQL input",
|
|
36
36
|
"type": "extension"
|
|
37
37
|
},
|
|
38
|
+
"compress": {
|
|
39
|
+
"description": "SQL compression functions",
|
|
40
|
+
"type": "extension"
|
|
41
|
+
},
|
|
38
42
|
"csv": {
|
|
39
43
|
"description": "A virtual table for reading CSV files",
|
|
40
44
|
"type": "extension"
|
|
@@ -99,6 +103,10 @@
|
|
|
99
103
|
"description": "Search a large vocabulary for close matches",
|
|
100
104
|
"type": "extension"
|
|
101
105
|
},
|
|
106
|
+
"sqlar": {
|
|
107
|
+
"description": "Utility functions for SQL archives",
|
|
108
|
+
"type": "extension"
|
|
109
|
+
},
|
|
102
110
|
"sqlite3_dbdump": {
|
|
103
111
|
"description": "Converts the content of a SQLite database into UTF-8 text SQL statements that can be used to exactly recreate the original database",
|
|
104
112
|
"type": "executable"
|
|
@@ -175,6 +183,10 @@
|
|
|
175
183
|
"description": "Shows low level content of a WAL file",
|
|
176
184
|
"type": "executable"
|
|
177
185
|
},
|
|
186
|
+
"sqlite3_sqlar": {
|
|
187
|
+
"description": "Command line SQL archive tool",
|
|
188
|
+
"type": "executable"
|
|
189
|
+
},
|
|
178
190
|
"stmt": {
|
|
179
191
|
"description": "Virtual table with information about all prepared statements on a connection",
|
|
180
192
|
"type": "extension"
|
|
@@ -211,6 +223,10 @@
|
|
|
211
223
|
"description": "Virtual table printing diagnostic information for interactive analysis and debugging",
|
|
212
224
|
"type": "extension"
|
|
213
225
|
},
|
|
226
|
+
"zipfile": {
|
|
227
|
+
"description": "Read/Write access to simple archives",
|
|
228
|
+
"type": "extension"
|
|
229
|
+
},
|
|
214
230
|
"zorder": {
|
|
215
231
|
"description": "Functions for z-order (Morton code) transformations",
|
|
216
232
|
"type": "extension"
|