sqlalchemy-boltons 1.0.1__py3-none-any.whl → 1.1.0__py3-none-any.whl
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.
- sqlalchemy_boltons/sqlite.py +13 -0
- {sqlalchemy_boltons-1.0.1.dist-info → sqlalchemy_boltons-1.1.0.dist-info}/METADATA +1 -1
- sqlalchemy_boltons-1.1.0.dist-info/RECORD +9 -0
- sqlalchemy_boltons-1.0.1.dist-info/RECORD +0 -9
- {sqlalchemy_boltons-1.0.1.dist-info → sqlalchemy_boltons-1.1.0.dist-info}/AUTHORS.md +0 -0
- {sqlalchemy_boltons-1.0.1.dist-info → sqlalchemy_boltons-1.1.0.dist-info}/LICENSE +0 -0
- {sqlalchemy_boltons-1.0.1.dist-info → sqlalchemy_boltons-1.1.0.dist-info}/WHEEL +0 -0
- {sqlalchemy_boltons-1.0.1.dist-info → sqlalchemy_boltons-1.1.0.dist-info}/top_level.txt +0 -0
sqlalchemy_boltons/sqlite.py
CHANGED
@@ -54,6 +54,16 @@ class SQLAlchemySqliteTransactionFix:
|
|
54
54
|
This class exists because sqlalchemy doesn't automatically fix pysqlite's stupid default behaviour. Additionally,
|
55
55
|
we implement support for foreign keys.
|
56
56
|
|
57
|
+
The execution options we look for are as follows:
|
58
|
+
|
59
|
+
- `x_sqlite_begin_mode`: The type of transaction to be started, such as "BEGIN" or
|
60
|
+
"[BEGIN IMMEDIATE](https://www.sqlite.org/lang_transaction.html)" (or
|
61
|
+
"[BEGIN CONCURRENT](https://www.sqlite.org/cgi/src/doc/begin-concurrent/doc/begin_concurrent.md)" someday maybe).
|
62
|
+
- `x_sqlite_foreign_keys`: The [foreign-key enforcement setting](https://www.sqlite.org/foreignkeys.html). Must be
|
63
|
+
`True`, `False`, or `"defer"`.
|
64
|
+
- `x_sqlite_journal_mode`: The [journal mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) such as
|
65
|
+
`"DELETE"` or `"WAL"`. Optional.
|
66
|
+
|
57
67
|
https://docs.sqlalchemy.org/en/20/dialects/sqlite.html#serializable-isolation-savepoints-transactional-ddl
|
58
68
|
"""
|
59
69
|
|
@@ -188,6 +198,9 @@ def create_engine_sqlite(
|
|
188
198
|
# always default to QueuePool
|
189
199
|
if (k := "poolclass") not in create_engine_args:
|
190
200
|
create_engine_args[k] = sap.QueuePool
|
201
|
+
if (k := "max_overflow") not in create_engine_args:
|
202
|
+
# for SQLite it doesn't make sense to restrict the number of concurrent (read-only) connections
|
203
|
+
create_engine_args["max_overflow"] = -1
|
191
204
|
|
192
205
|
if (v := create_engine_args.get(k := "connect_args")) is None:
|
193
206
|
create_engine_args[k] = v = {}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sqlalchemy-boltons
|
3
|
-
Version: 1.0
|
3
|
+
Version: 1.1.0
|
4
4
|
Summary: Utilities that should've been inside SQLAlchemy but aren't
|
5
5
|
Author-email: Eduard Christian Dumitrescu <eduard.c.dumitrescu@gmail.com>
|
6
6
|
Maintainer-email: Eduard Christian Dumitrescu <eduard.c.dumitrescu@gmail.com>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
sqlalchemy_boltons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
sqlalchemy_boltons/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
sqlalchemy_boltons/sqlite.py,sha256=dPPsxJh_YARZ1f2EoLNNo4XJSJLjKOPVDGOsO-O03Qo,8853
|
4
|
+
sqlalchemy_boltons-1.1.0.dist-info/AUTHORS.md,sha256=sXkm88GaYJ63k0Hy7UlGboAT4aytU8e1_K0wNo7WwD8,144
|
5
|
+
sqlalchemy_boltons-1.1.0.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
sqlalchemy_boltons-1.1.0.dist-info/METADATA,sha256=7GJWM3mC9MUqGyKCg6wL7IOKOl7LGAU5YgqzALPNFlY,2852
|
7
|
+
sqlalchemy_boltons-1.1.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
8
|
+
sqlalchemy_boltons-1.1.0.dist-info/top_level.txt,sha256=mlvZ3R5FelrQt2SNXCtw2bDXcTROxl5O_gDFnWXPQ84,19
|
9
|
+
sqlalchemy_boltons-1.1.0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
sqlalchemy_boltons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
sqlalchemy_boltons/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
sqlalchemy_boltons/sqlite.py,sha256=fIS9rsmEFRakSl8DLwHqVJ-M9K1w6Q0XEJieYNH1b98,7985
|
4
|
-
sqlalchemy_boltons-1.0.1.dist-info/AUTHORS.md,sha256=sXkm88GaYJ63k0Hy7UlGboAT4aytU8e1_K0wNo7WwD8,144
|
5
|
-
sqlalchemy_boltons-1.0.1.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
sqlalchemy_boltons-1.0.1.dist-info/METADATA,sha256=t5yyOnZzl415Jo4q4gh2YeJD-EtDYdLEdqT0qolPzn4,2852
|
7
|
-
sqlalchemy_boltons-1.0.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
8
|
-
sqlalchemy_boltons-1.0.1.dist-info/top_level.txt,sha256=mlvZ3R5FelrQt2SNXCtw2bDXcTROxl5O_gDFnWXPQ84,19
|
9
|
-
sqlalchemy_boltons-1.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|