SQLAlchemy 2.0.58__py3-none-any.whl → 2.0.59__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/__init__.py +1 -1
- sqlalchemy/dialects/mssql/base.py +1 -1
- sqlalchemy/dialects/mssql/pyodbc.py +3 -1
- sqlalchemy/dialects/mysql/pymysql.py +3 -1
- sqlalchemy/dialects/postgresql/asyncpg.py +41 -2
- sqlalchemy/dialects/sqlite/aiosqlite.py +30 -2
- sqlalchemy/dialects/sqlite/pysqlite.py +38 -0
- sqlalchemy/event/registry.py +8 -4
- sqlalchemy/orm/bulk_persistence.py +35 -8
- sqlalchemy/orm/evaluator.py +147 -29
- sqlalchemy/sql/compiler.py +41 -10
- sqlalchemy/sql/functions.py +21 -0
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/METADATA +1 -1
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/RECORD +18 -18
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/WHEEL +0 -0
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/licenses/AUTHORS +0 -0
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/licenses/LICENSE +0 -0
- {sqlalchemy-2.0.58.dist-info → sqlalchemy-2.0.59.dist-info}/top_level.txt +0 -0
sqlalchemy/__init__.py
CHANGED
|
@@ -1948,7 +1948,7 @@ class MSExecutionContext(default.DefaultExecutionContext):
|
|
|
1948
1948
|
)
|
|
1949
1949
|
# fetchall() ensures the cursor is consumed without closing it
|
|
1950
1950
|
row = self.cursor.fetchall()[0]
|
|
1951
|
-
self._lastrowid = int(row[0])
|
|
1951
|
+
self._lastrowid = int(row[0]) if row[0] is not None else None
|
|
1952
1952
|
|
|
1953
1953
|
self.cursor_fetch_strategy = _cursor._NO_CURSOR_DML
|
|
1954
1954
|
elif (
|
|
@@ -609,7 +609,9 @@ class MSExecutionContext_pyodbc(MSExecutionContext):
|
|
|
609
609
|
row = rows[0]
|
|
610
610
|
break
|
|
611
611
|
|
|
612
|
-
|
|
612
|
+
# scope_identity() is NULL if no identity was generated in this
|
|
613
|
+
# scope, e.g. IGNORE_DUP_KEY, INSTEAD OF trigger
|
|
614
|
+
self._lastrowid = int(row[0]) if row[0] is not None else None
|
|
613
615
|
|
|
614
616
|
self.cursor_fetch_strategy = _cursor._NO_CURSOR_DML
|
|
615
617
|
else:
|
|
@@ -165,7 +165,9 @@ class MySQLDialect_pymysql(MySQLDialect_mysqldb):
|
|
|
165
165
|
elif isinstance(e, self.loaded_dbapi.Error):
|
|
166
166
|
str_e = str(e).lower()
|
|
167
167
|
return (
|
|
168
|
-
"already closed" in str_e
|
|
168
|
+
"already closed" in str_e
|
|
169
|
+
or "connection was killed" in str_e
|
|
170
|
+
or "packet sequence number wrong" in str_e
|
|
169
171
|
)
|
|
170
172
|
else:
|
|
171
173
|
return False
|
|
@@ -1010,16 +1010,55 @@ class AsyncAdapt_asyncpg_dbapi:
|
|
|
1010
1010
|
def _asyncpg_error_translate(self):
|
|
1011
1011
|
import asyncpg
|
|
1012
1012
|
|
|
1013
|
-
|
|
1013
|
+
translate = {
|
|
1014
1014
|
asyncpg.exceptions.IntegrityConstraintViolationError: self.IntegrityError, # noqa: E501
|
|
1015
|
-
asyncpg.exceptions.PostgresError: self.
|
|
1015
|
+
asyncpg.exceptions.PostgresError: self.DatabaseError,
|
|
1016
1016
|
asyncpg.exceptions.SyntaxOrAccessError: self.ProgrammingError,
|
|
1017
1017
|
asyncpg.exceptions.InterfaceError: self.InterfaceError,
|
|
1018
1018
|
asyncpg.exceptions.InvalidCachedStatementError: self.InvalidCachedStatementError, # noqa: E501
|
|
1019
1019
|
asyncpg.exceptions.InternalServerError: self.InternalServerError,
|
|
1020
1020
|
asyncpg.exceptions.InternalClientError: self.InternalClientError,
|
|
1021
|
+
asyncpg.exceptions.PostgresConnectionError: self.OperationalError,
|
|
1022
|
+
asyncpg.exceptions.FeatureNotSupportedError: self.NotSupportedError, # noqa: E501
|
|
1023
|
+
asyncpg.exceptions.CaseNotFoundError: self.ProgrammingError,
|
|
1024
|
+
asyncpg.exceptions.CardinalityViolationError: self.ProgrammingError, # noqa: E501
|
|
1025
|
+
asyncpg.exceptions.DataError: self.DataError,
|
|
1026
|
+
asyncpg.exceptions.InvalidCursorStateError: self.InternalError,
|
|
1027
|
+
asyncpg.exceptions.InvalidTransactionStateError: self.InternalError, # noqa: E501
|
|
1028
|
+
asyncpg.exceptions.InvalidSQLStatementNameError: self.ProgrammingError, # noqa: E501
|
|
1029
|
+
asyncpg.exceptions.TriggeredDataChangeViolationError: self.OperationalError, # noqa: E501
|
|
1030
|
+
asyncpg.exceptions.InvalidAuthorizationSpecificationError: self.OperationalError, # noqa: E501
|
|
1031
|
+
asyncpg.exceptions.DependentPrivilegeDescriptorsStillExistError: self.InternalError, # noqa: E501
|
|
1032
|
+
asyncpg.exceptions.InvalidTransactionTerminationError: self.InternalError, # noqa: E501
|
|
1033
|
+
asyncpg.exceptions.SQLRoutineError: self.OperationalError,
|
|
1034
|
+
asyncpg.exceptions.InvalidCursorNameError: self.ProgrammingError,
|
|
1035
|
+
asyncpg.exceptions.ExternalRoutineError: self.OperationalError,
|
|
1036
|
+
asyncpg.exceptions.ExternalRoutineInvocationError: self.OperationalError, # noqa: E501
|
|
1037
|
+
asyncpg.exceptions.SavepointError: self.OperationalError,
|
|
1038
|
+
asyncpg.exceptions.InvalidCatalogNameError: self.ProgrammingError,
|
|
1039
|
+
asyncpg.exceptions.InvalidSchemaNameError: self.ProgrammingError,
|
|
1040
|
+
asyncpg.exceptions.TransactionRollbackError: self.OperationalError,
|
|
1041
|
+
asyncpg.exceptions.WithCheckOptionViolationError: self.ProgrammingError, # noqa: E501
|
|
1042
|
+
asyncpg.exceptions.InsufficientResourcesError: self.OperationalError, # noqa: E501
|
|
1043
|
+
asyncpg.exceptions.ProgramLimitExceededError: self.OperationalError, # noqa: E501
|
|
1044
|
+
asyncpg.exceptions.ObjectNotInPrerequisiteStateError: self.OperationalError, # noqa: E501
|
|
1045
|
+
asyncpg.exceptions.OperatorInterventionError: self.OperationalError, # noqa: E501
|
|
1046
|
+
asyncpg.exceptions.PostgresSystemError: self.OperationalError,
|
|
1047
|
+
asyncpg.exceptions.ConfigFileError: self.OperationalError,
|
|
1048
|
+
asyncpg.exceptions.FDWError: self.OperationalError,
|
|
1049
|
+
asyncpg.exceptions.PLPGSQLError: self.ProgrammingError,
|
|
1021
1050
|
}
|
|
1022
1051
|
|
|
1052
|
+
# class 10 (XQuery) has an exception class only as of asyncpg 0.30.0
|
|
1053
|
+
# (https://github.com/MagicStack/asyncpg/pull/1189)
|
|
1054
|
+
xquery_error = getattr(
|
|
1055
|
+
asyncpg.exceptions, "InvalidArgumentForXqueryError", None
|
|
1056
|
+
)
|
|
1057
|
+
if xquery_error is not None:
|
|
1058
|
+
translate[xquery_error] = self.ProgrammingError
|
|
1059
|
+
|
|
1060
|
+
return translate
|
|
1061
|
+
|
|
1023
1062
|
def Binary(self, value):
|
|
1024
1063
|
return value
|
|
1025
1064
|
|
|
@@ -186,8 +186,10 @@ class AsyncAdapt_aiosqlite_cursor:
|
|
|
186
186
|
parameters: Optional[_DBAPISingleExecuteParams] = None,
|
|
187
187
|
) -> Any:
|
|
188
188
|
|
|
189
|
+
driver_cursor: Optional[AsyncIODBAPICursor] = None
|
|
189
190
|
try:
|
|
190
191
|
_cursor: AsyncIODBAPICursor = self.await_(self._connection.cursor()) # type: ignore[arg-type] # noqa: E501
|
|
192
|
+
driver_cursor = _cursor
|
|
191
193
|
|
|
192
194
|
if parameters is None:
|
|
193
195
|
self.await_(_cursor.execute(operation))
|
|
@@ -209,7 +211,11 @@ class AsyncAdapt_aiosqlite_cursor:
|
|
|
209
211
|
self.await_(_cursor.close())
|
|
210
212
|
else:
|
|
211
213
|
self._cursor = _cursor # type: ignore[misc]
|
|
212
|
-
except
|
|
214
|
+
except BaseException as error:
|
|
215
|
+
if driver_cursor is not None:
|
|
216
|
+
self._close_interrupted(driver_cursor, error)
|
|
217
|
+
if not isinstance(error, Exception):
|
|
218
|
+
raise
|
|
213
219
|
self._adapt_connection._handle_exception(error)
|
|
214
220
|
|
|
215
221
|
def executemany(
|
|
@@ -217,16 +223,38 @@ class AsyncAdapt_aiosqlite_cursor:
|
|
|
217
223
|
operation: Any,
|
|
218
224
|
seq_of_parameters: _DBAPIMultiExecuteParams,
|
|
219
225
|
) -> Any:
|
|
226
|
+
driver_cursor: Optional[AsyncIODBAPICursor] = None
|
|
220
227
|
try:
|
|
221
228
|
_cursor: AsyncIODBAPICursor = self.await_(self._connection.cursor()) # type: ignore[arg-type] # noqa: E501
|
|
229
|
+
driver_cursor = _cursor
|
|
222
230
|
self.await_(_cursor.executemany(operation, seq_of_parameters))
|
|
223
231
|
self.description = None
|
|
224
232
|
self.lastrowid = _cursor.lastrowid
|
|
225
233
|
self.rowcount = _cursor.rowcount
|
|
226
234
|
self.await_(_cursor.close())
|
|
227
|
-
except
|
|
235
|
+
except BaseException as error:
|
|
236
|
+
if driver_cursor is not None:
|
|
237
|
+
self._close_interrupted(driver_cursor, error)
|
|
238
|
+
if not isinstance(error, Exception):
|
|
239
|
+
raise
|
|
228
240
|
self._adapt_connection._handle_exception(error)
|
|
229
241
|
|
|
242
|
+
def _close_interrupted(
|
|
243
|
+
self, cursor: AsyncIODBAPICursor, error: BaseException
|
|
244
|
+
) -> None:
|
|
245
|
+
# an exit exception such as asyncio.CancelledError invalidates the
|
|
246
|
+
# connection without the cursor being closed. sqlite3 as of
|
|
247
|
+
# Python 3.11 does not finalize a closed connection's statements,
|
|
248
|
+
# so a cursor left open keeps the database file locked until it's
|
|
249
|
+
# garbage collected. close it here; aiosqlite runs the close on
|
|
250
|
+
# its worker thread after the interrupted statement completes.
|
|
251
|
+
# see #13831
|
|
252
|
+
if util.is_exit_exception(error):
|
|
253
|
+
try:
|
|
254
|
+
self.await_(cursor.close())
|
|
255
|
+
except Exception:
|
|
256
|
+
pass
|
|
257
|
+
|
|
230
258
|
def setinputsizes(self, *inputsizes: Any) -> None:
|
|
231
259
|
pass
|
|
232
260
|
|
|
@@ -261,6 +261,44 @@ connection reuse implemented by :class:`.QueuePool`. However, it still
|
|
|
261
261
|
may be beneficial to use this class if the application is experiencing
|
|
262
262
|
issues with files being locked.
|
|
263
263
|
|
|
264
|
+
.. _pysqlite_freethreaded:
|
|
265
|
+
|
|
266
|
+
Free-Threaded Python and "database is locked" Errors
|
|
267
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
268
|
+
|
|
269
|
+
On free-threaded builds of Python, the ``sqlite3`` driver may stall and then
|
|
270
|
+
raise ``database is locked`` when a connection is used by different threads
|
|
271
|
+
over time, as occurs when using :class:`.QueuePool`, even though only one
|
|
272
|
+
thread makes use of the connection at once. When a statement is evicted from
|
|
273
|
+
the driver's per-connection statement cache, its finalization may be deferred
|
|
274
|
+
to the thread which created it; if that thread holds SQLite's write lock on
|
|
275
|
+
another connection, while the thread that evicted the statement is waiting for
|
|
276
|
+
that same lock, neither thread can proceed until the SQLite busy timeout
|
|
277
|
+
expires.
|
|
278
|
+
|
|
279
|
+
This is an issue in the ``sqlite3`` driver itself, tracked at
|
|
280
|
+
https://github.com/python/cpython/issues/162919. It has been observed to
|
|
281
|
+
depend on the Python build in use and not on whether the GIL is enabled at
|
|
282
|
+
runtime, so ``PYTHON_GIL=1`` should not be relied upon as a workaround.
|
|
283
|
+
|
|
284
|
+
The issue may be avoided by disabling the statement cache of the ``sqlite3``
|
|
285
|
+
driver, which allows connection pooling to be retained::
|
|
286
|
+
|
|
287
|
+
engine = create_engine(
|
|
288
|
+
"sqlite:///myfile.db", connect_args={"cached_statements": 0}
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
Alternatively, :class:`.NullPool` may be used, so that connections are not
|
|
292
|
+
reused among threads::
|
|
293
|
+
|
|
294
|
+
from sqlalchemy import NullPool
|
|
295
|
+
|
|
296
|
+
engine = create_engine("sqlite:///myfile.db", poolclass=NullPool)
|
|
297
|
+
|
|
298
|
+
.. seealso::
|
|
299
|
+
|
|
300
|
+
:ticket:`13825`
|
|
301
|
+
|
|
264
302
|
Using a Memory Database in Multiple Threads or Coroutines
|
|
265
303
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
266
304
|
|
sqlalchemy/event/registry.py
CHANGED
|
@@ -123,11 +123,14 @@ def _stored_in_collection(
|
|
|
123
123
|
) -> bool:
|
|
124
124
|
key = event_key._key
|
|
125
125
|
|
|
126
|
-
dispatch_reg = _key_to_collection[key]
|
|
127
|
-
|
|
128
126
|
owner_ref = owner.ref
|
|
129
127
|
listen_ref = weakref.ref(event_key._listen_fn)
|
|
130
128
|
|
|
129
|
+
# look up dispatch_reg only after allocating the weakref; the allocation
|
|
130
|
+
# can run the cyclic collector, which may detach this dict from
|
|
131
|
+
# _key_to_collection via _collection_gced, see #13805
|
|
132
|
+
dispatch_reg = _key_to_collection[key]
|
|
133
|
+
|
|
131
134
|
if owner_ref in dispatch_reg:
|
|
132
135
|
return False
|
|
133
136
|
|
|
@@ -144,10 +147,11 @@ def _removed_from_collection(
|
|
|
144
147
|
) -> None:
|
|
145
148
|
key = event_key._key
|
|
146
149
|
|
|
147
|
-
dispatch_reg = _key_to_collection[key]
|
|
148
|
-
|
|
149
150
|
listen_ref = weakref.ref(event_key._listen_fn)
|
|
150
151
|
|
|
152
|
+
# look up dispatch_reg after allocating the weakref, see #13805
|
|
153
|
+
dispatch_reg = _key_to_collection[key]
|
|
154
|
+
|
|
151
155
|
owner_ref = owner.ref
|
|
152
156
|
dispatch_reg.pop(owner_ref, None)
|
|
153
157
|
if not dispatch_reg:
|
|
@@ -1771,12 +1771,22 @@ class BulkORMUpdate(BulkUDCompileState, UpdateDMLState):
|
|
|
1771
1771
|
session.identity_map.all_states(),
|
|
1772
1772
|
)
|
|
1773
1773
|
|
|
1774
|
+
to_update = []
|
|
1775
|
+
for obj, state, dict_, is_partially_expired in matched_objects:
|
|
1776
|
+
if is_partially_expired:
|
|
1777
|
+
# the criteria read expired attributes, so it's not known
|
|
1778
|
+
# if the row matched; expire the object, as is the case
|
|
1779
|
+
# for DELETE
|
|
1780
|
+
state._expire(dict_, session.identity_map._modified)
|
|
1781
|
+
else:
|
|
1782
|
+
to_update.append((obj, state, dict_))
|
|
1783
|
+
|
|
1774
1784
|
cls._apply_update_set_values_to_objects(
|
|
1775
1785
|
session,
|
|
1776
1786
|
update_options,
|
|
1777
1787
|
statement,
|
|
1778
1788
|
result.context.compiled_parameters[0],
|
|
1779
|
-
|
|
1789
|
+
to_update,
|
|
1780
1790
|
result.prefetch_cols(),
|
|
1781
1791
|
result.postfetch_cols(),
|
|
1782
1792
|
)
|
|
@@ -1892,6 +1902,28 @@ class BulkORMUpdate(BulkUDCompileState, UpdateDMLState):
|
|
|
1892
1902
|
]
|
|
1893
1903
|
|
|
1894
1904
|
for obj, state, dict_ in matched_objects:
|
|
1905
|
+
to_evaluate = state.unmodified.intersection(evaluated_keys)
|
|
1906
|
+
|
|
1907
|
+
# evaluate all SET values against the object as it was before
|
|
1908
|
+
# the UPDATE, before any of them are applied, as the database
|
|
1909
|
+
# does; only run eval for attributes that are present.
|
|
1910
|
+
evaluated_values = {
|
|
1911
|
+
key: value_evaluators[key](obj)
|
|
1912
|
+
for key in to_evaluate
|
|
1913
|
+
if key in dict_
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
# a SET value that read an expired attribute can't be known;
|
|
1917
|
+
# expire the target attribute
|
|
1918
|
+
expired_values = {
|
|
1919
|
+
key
|
|
1920
|
+
for key, value in evaluated_values.items()
|
|
1921
|
+
if value is evaluator._EXPIRED_OBJECT
|
|
1922
|
+
}
|
|
1923
|
+
if expired_values:
|
|
1924
|
+
to_evaluate.difference_update(expired_values)
|
|
1925
|
+
for key in expired_values:
|
|
1926
|
+
del evaluated_values[key]
|
|
1895
1927
|
|
|
1896
1928
|
dict_.update(
|
|
1897
1929
|
{
|
|
@@ -1900,14 +1932,9 @@ class BulkORMUpdate(BulkUDCompileState, UpdateDMLState):
|
|
|
1900
1932
|
}
|
|
1901
1933
|
)
|
|
1902
1934
|
|
|
1903
|
-
state._expire_attributes(
|
|
1904
|
-
|
|
1905
|
-
to_evaluate = state.unmodified.intersection(evaluated_keys)
|
|
1935
|
+
state._expire_attributes(dict_, to_expire.union(expired_values))
|
|
1906
1936
|
|
|
1907
|
-
|
|
1908
|
-
if key in dict_:
|
|
1909
|
-
# only run eval for attributes that are present.
|
|
1910
|
-
dict_[key] = value_evaluators[key](obj)
|
|
1937
|
+
dict_.update(evaluated_values)
|
|
1911
1938
|
|
|
1912
1939
|
state.manager.dispatch.refresh(state, None, to_evaluate)
|
|
1913
1940
|
|
sqlalchemy/orm/evaluator.py
CHANGED
|
@@ -18,6 +18,7 @@ This module is **private, for internal use by SQLAlchemy**.
|
|
|
18
18
|
|
|
19
19
|
from __future__ import annotations
|
|
20
20
|
|
|
21
|
+
import math
|
|
21
22
|
from typing import Type
|
|
22
23
|
|
|
23
24
|
from . import exc as orm_exc
|
|
@@ -30,6 +31,7 @@ from ..sql import operators
|
|
|
30
31
|
from ..sql.sqltypes import Concatenable
|
|
31
32
|
from ..sql.sqltypes import Integer
|
|
32
33
|
from ..sql.sqltypes import Numeric
|
|
34
|
+
from ..sql.sqltypes import TupleType
|
|
33
35
|
from ..util import warn_deprecated
|
|
34
36
|
|
|
35
37
|
|
|
@@ -57,6 +59,89 @@ _NO_OBJECT = _NoObject()
|
|
|
57
59
|
_EXPIRED_OBJECT = _ExpiredObject()
|
|
58
60
|
|
|
59
61
|
|
|
62
|
+
def _and_3vl(values):
|
|
63
|
+
"""SQL AND of values that are True, False or None (NULL)"""
|
|
64
|
+
result = True
|
|
65
|
+
for value in values:
|
|
66
|
+
if value is None:
|
|
67
|
+
result = None
|
|
68
|
+
elif not value:
|
|
69
|
+
return False
|
|
70
|
+
return result
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _or_3vl(values):
|
|
74
|
+
"""SQL OR of values that are True, False or None (NULL)"""
|
|
75
|
+
result = False
|
|
76
|
+
for value in values:
|
|
77
|
+
if value is None:
|
|
78
|
+
result = None
|
|
79
|
+
elif value:
|
|
80
|
+
return True
|
|
81
|
+
return result
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _compare_3vl(operator, a, b):
|
|
85
|
+
"""compare two scalar values, or two tuples as SQL row values, where
|
|
86
|
+
None is NULL. returns True, False or None.
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
if isinstance(a, tuple):
|
|
90
|
+
if operator is operators.eq:
|
|
91
|
+
return _and_3vl(_compare_3vl(operator, x, y) for x, y in zip(a, b))
|
|
92
|
+
elif operator is operators.ne:
|
|
93
|
+
return _or_3vl(_compare_3vl(operator, x, y) for x, y in zip(a, b))
|
|
94
|
+
|
|
95
|
+
# row value ordering comparison, e.g. for "<":
|
|
96
|
+
# a1 < b1 OR (a1 = b1 AND (a2 < b2 OR (a2 = b2 AND ...)))
|
|
97
|
+
strict = {
|
|
98
|
+
operators.le: operators.lt,
|
|
99
|
+
operators.ge: operators.gt,
|
|
100
|
+
}.get(operator, operator)
|
|
101
|
+
result = _compare_3vl(operator, a[-1], b[-1])
|
|
102
|
+
for x, y in zip(reversed(a[:-1]), reversed(b[:-1])):
|
|
103
|
+
result = _or_3vl(
|
|
104
|
+
(
|
|
105
|
+
_compare_3vl(strict, x, y),
|
|
106
|
+
_and_3vl((_compare_3vl(operators.eq, x, y), result)),
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
return result
|
|
110
|
+
elif a is None or b is None:
|
|
111
|
+
return None
|
|
112
|
+
else:
|
|
113
|
+
return operator(a, b)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def _in_3vl(a, b):
|
|
117
|
+
"""SQL IN of a scalar or tuple value against a list of values"""
|
|
118
|
+
|
|
119
|
+
# IN against an empty list is false; it's rendered as such for all
|
|
120
|
+
# backends including for a NULL left side
|
|
121
|
+
if not b:
|
|
122
|
+
return False
|
|
123
|
+
return _or_3vl(_compare_3vl(operators.eq, a, item) for item in b)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _not_3vl(value):
|
|
127
|
+
return None if value is None else not value
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def _sql_mod(a, b):
|
|
131
|
+
"""modulus with the sign of the dividend, as is the case for SQL; Python
|
|
132
|
+
integers and floats take the sign of the divisor. Python's Decimal
|
|
133
|
+
already uses the SQL convention.
|
|
134
|
+
|
|
135
|
+
"""
|
|
136
|
+
if isinstance(a, int) and isinstance(b, int):
|
|
137
|
+
result = abs(a) % abs(b)
|
|
138
|
+
return -result if a < 0 else result
|
|
139
|
+
elif isinstance(a, float) or isinstance(b, float):
|
|
140
|
+
return math.fmod(a, b)
|
|
141
|
+
else:
|
|
142
|
+
return a % b
|
|
143
|
+
|
|
144
|
+
|
|
60
145
|
class _EvaluatorCompiler:
|
|
61
146
|
def __init__(self, target_cls=None):
|
|
62
147
|
self.target_cls = target_cls
|
|
@@ -179,9 +264,10 @@ class _EvaluatorCompiler:
|
|
|
179
264
|
value = sub_evaluate(obj)
|
|
180
265
|
if value is _EXPIRED_OBJECT:
|
|
181
266
|
return _EXPIRED_OBJECT
|
|
267
|
+
elif value is None or value is _NO_OBJECT:
|
|
268
|
+
has_null = True
|
|
182
269
|
elif value:
|
|
183
270
|
return True
|
|
184
|
-
has_null = has_null or value is None
|
|
185
271
|
if has_null:
|
|
186
272
|
return None
|
|
187
273
|
return False
|
|
@@ -190,15 +276,17 @@ class _EvaluatorCompiler:
|
|
|
190
276
|
|
|
191
277
|
def visit_and_clauselist_op(self, operator, evaluators, clause):
|
|
192
278
|
def evaluate(obj):
|
|
279
|
+
has_null = False
|
|
193
280
|
for sub_evaluate in evaluators:
|
|
194
281
|
value = sub_evaluate(obj)
|
|
195
282
|
if value is _EXPIRED_OBJECT:
|
|
196
283
|
return _EXPIRED_OBJECT
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return None
|
|
284
|
+
elif value is None or value is _NO_OBJECT:
|
|
285
|
+
has_null = True
|
|
286
|
+
elif not value:
|
|
201
287
|
return False
|
|
288
|
+
if has_null:
|
|
289
|
+
return None
|
|
202
290
|
return True
|
|
203
291
|
|
|
204
292
|
return evaluate
|
|
@@ -210,8 +298,11 @@ class _EvaluatorCompiler:
|
|
|
210
298
|
value = sub_evaluate(obj)
|
|
211
299
|
if value is _EXPIRED_OBJECT:
|
|
212
300
|
return _EXPIRED_OBJECT
|
|
213
|
-
elif value is
|
|
214
|
-
|
|
301
|
+
elif value is _NO_OBJECT:
|
|
302
|
+
value = None
|
|
303
|
+
|
|
304
|
+
# a NULL element doesn't make the whole tuple NULL;
|
|
305
|
+
# comparisons are per element
|
|
215
306
|
values.append(value)
|
|
216
307
|
return tuple(values)
|
|
217
308
|
|
|
@@ -264,9 +355,7 @@ class _EvaluatorCompiler:
|
|
|
264
355
|
|
|
265
356
|
return evaluate
|
|
266
357
|
|
|
267
|
-
def
|
|
268
|
-
self, operator, eval_left, eval_right, clause
|
|
269
|
-
):
|
|
358
|
+
def _assert_numeric(self, operator, clause):
|
|
270
359
|
if clause.left.type._type_affinity not in (
|
|
271
360
|
Numeric,
|
|
272
361
|
Integer,
|
|
@@ -276,37 +365,66 @@ class _EvaluatorCompiler:
|
|
|
276
365
|
f"datatypes {clause.left.type}, {clause.right.type}"
|
|
277
366
|
)
|
|
278
367
|
|
|
368
|
+
def _straight_evaluate_numeric_only(
|
|
369
|
+
self, operator, eval_left, eval_right, clause
|
|
370
|
+
):
|
|
371
|
+
self._assert_numeric(operator, clause)
|
|
279
372
|
return self._straight_evaluate(operator, eval_left, eval_right, clause)
|
|
280
373
|
|
|
374
|
+
def _comparison(self, operator, eval_left, eval_right, clause):
|
|
375
|
+
if isinstance(clause.left.type, TupleType) or isinstance(
|
|
376
|
+
clause.right.type, TupleType
|
|
377
|
+
):
|
|
378
|
+
# row value comparison; tuples may contain NULL elements
|
|
379
|
+
return self._straight_evaluate(
|
|
380
|
+
lambda a, b: _compare_3vl(operator, a, b),
|
|
381
|
+
eval_left,
|
|
382
|
+
eval_right,
|
|
383
|
+
clause,
|
|
384
|
+
)
|
|
385
|
+
else:
|
|
386
|
+
return self._straight_evaluate(
|
|
387
|
+
operator, eval_left, eval_right, clause
|
|
388
|
+
)
|
|
389
|
+
|
|
281
390
|
visit_add_binary_op = _straight_evaluate_numeric_only
|
|
282
391
|
visit_mul_binary_op = _straight_evaluate_numeric_only
|
|
283
392
|
visit_sub_binary_op = _straight_evaluate_numeric_only
|
|
284
|
-
visit_mod_binary_op = _straight_evaluate_numeric_only
|
|
285
393
|
visit_truediv_binary_op = _straight_evaluate_numeric_only
|
|
286
|
-
visit_lt_binary_op =
|
|
287
|
-
visit_le_binary_op =
|
|
288
|
-
visit_ne_binary_op =
|
|
289
|
-
visit_gt_binary_op =
|
|
290
|
-
visit_ge_binary_op =
|
|
291
|
-
visit_eq_binary_op =
|
|
394
|
+
visit_lt_binary_op = _comparison
|
|
395
|
+
visit_le_binary_op = _comparison
|
|
396
|
+
visit_ne_binary_op = _comparison
|
|
397
|
+
visit_gt_binary_op = _comparison
|
|
398
|
+
visit_ge_binary_op = _comparison
|
|
399
|
+
visit_eq_binary_op = _comparison
|
|
400
|
+
|
|
401
|
+
def visit_mod_binary_op(self, operator, eval_left, eval_right, clause):
|
|
402
|
+
self._assert_numeric(operator, clause)
|
|
403
|
+
return self._straight_evaluate(_sql_mod, eval_left, eval_right, clause)
|
|
404
|
+
|
|
405
|
+
def _in_evaluate(self, eval_left, eval_right, negate):
|
|
406
|
+
def evaluate(obj):
|
|
407
|
+
left_val = eval_left(obj)
|
|
408
|
+
right_val = eval_right(obj)
|
|
409
|
+
if left_val is _EXPIRED_OBJECT or right_val is _EXPIRED_OBJECT:
|
|
410
|
+
return _EXPIRED_OBJECT
|
|
411
|
+
elif right_val is None:
|
|
412
|
+
return None
|
|
413
|
+
elif left_val is _NO_OBJECT:
|
|
414
|
+
left_val = None
|
|
415
|
+
|
|
416
|
+
result = _in_3vl(left_val, right_val)
|
|
417
|
+
return _not_3vl(result) if negate else result
|
|
418
|
+
|
|
419
|
+
return evaluate
|
|
292
420
|
|
|
293
421
|
def visit_in_op_binary_op(self, operator, eval_left, eval_right, clause):
|
|
294
|
-
return self.
|
|
295
|
-
lambda a, b: a in b if a is not _NO_OBJECT else None,
|
|
296
|
-
eval_left,
|
|
297
|
-
eval_right,
|
|
298
|
-
clause,
|
|
299
|
-
)
|
|
422
|
+
return self._in_evaluate(eval_left, eval_right, False)
|
|
300
423
|
|
|
301
424
|
def visit_not_in_op_binary_op(
|
|
302
425
|
self, operator, eval_left, eval_right, clause
|
|
303
426
|
):
|
|
304
|
-
return self.
|
|
305
|
-
lambda a, b: a not in b if a is not _NO_OBJECT else None,
|
|
306
|
-
eval_left,
|
|
307
|
-
eval_right,
|
|
308
|
-
clause,
|
|
309
|
-
)
|
|
427
|
+
return self._in_evaluate(eval_left, eval_right, True)
|
|
310
428
|
|
|
311
429
|
def visit_concat_op_binary_op(
|
|
312
430
|
self, operator, eval_left, eval_right, clause
|
sqlalchemy/sql/compiler.py
CHANGED
|
@@ -258,6 +258,31 @@ FK_ON_DELETE = FK_ON_UPDATE = FK_INITIALLY = SQL_KEYWORD_PHRASE
|
|
|
258
258
|
BIND_PARAMS = elements.TextClause._bind_params_regex
|
|
259
259
|
BIND_PARAMS_ESC = re.compile(r"\x5c(:\w*)(?![:\w])", re.UNICODE)
|
|
260
260
|
|
|
261
|
+
# placeholder tokens that the compiler writes into a SQL string, and later
|
|
262
|
+
# substitutes by scanning the string, all take the form "__[KIND_...]",
|
|
263
|
+
# e.g. "__[POSTCOMPILE_param_1]", "__[SCHEMA_someschema]". Identifiers
|
|
264
|
+
# and literal values that contain this form are refused when rendered, so
|
|
265
|
+
# that text from outside of SQLAlchemy can't be taken for a token by one of
|
|
266
|
+
# those scans. Any new kind of token must use this same form. see #13830
|
|
267
|
+
_RESERVED_TOKEN = re.compile(r"__\[[A-Z]+_")
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _check_reserved_token(
|
|
271
|
+
rendered: str, value: Any, *, is_literal: bool
|
|
272
|
+
) -> None:
|
|
273
|
+
if "__[" in rendered:
|
|
274
|
+
m = _RESERVED_TOKEN.search(rendered)
|
|
275
|
+
if m:
|
|
276
|
+
if is_literal:
|
|
277
|
+
desc = f"Literal value {sql_util._repr_single_value(value)}"
|
|
278
|
+
else:
|
|
279
|
+
desc = f"Identifier {value!r}"
|
|
280
|
+
raise exc.CompileError(
|
|
281
|
+
f"{desc} contains {m.group(0)!r}, which is reserved for "
|
|
282
|
+
"SQLAlchemy placeholder tokens"
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
261
286
|
_pyformat_template = "%%(%(name)s)s"
|
|
262
287
|
BIND_TEMPLATES = {
|
|
263
288
|
"pyformat": _pyformat_template,
|
|
@@ -4030,7 +4055,7 @@ class SQLCompiler(Compiled):
|
|
|
4030
4055
|
processor = type_._cached_literal_processor(self.dialect)
|
|
4031
4056
|
if processor:
|
|
4032
4057
|
try:
|
|
4033
|
-
|
|
4058
|
+
rendered = processor(value)
|
|
4034
4059
|
except Exception as e:
|
|
4035
4060
|
raise exc.CompileError(
|
|
4036
4061
|
f"Could not render literal value "
|
|
@@ -4039,6 +4064,8 @@ class SQLCompiler(Compiled):
|
|
|
4039
4064
|
f"{type_}; see parent stack trace for "
|
|
4040
4065
|
"more detail."
|
|
4041
4066
|
) from e
|
|
4067
|
+
_check_reserved_token(rendered, value, is_literal=True)
|
|
4068
|
+
return rendered
|
|
4042
4069
|
|
|
4043
4070
|
else:
|
|
4044
4071
|
raise exc.CompileError(
|
|
@@ -5753,7 +5780,9 @@ class SQLCompiler(Compiled):
|
|
|
5753
5780
|
imv_single_values_expr = rst(imv_single_values_expr)
|
|
5754
5781
|
|
|
5755
5782
|
executemany_values = f"({imv_single_values_expr})"
|
|
5756
|
-
statement = statement.replace(
|
|
5783
|
+
statement = statement.replace(
|
|
5784
|
+
executemany_values, "__[EXECMANY_VALUES]"
|
|
5785
|
+
)
|
|
5757
5786
|
|
|
5758
5787
|
# Use optional insertmanyvalues_max_parameters
|
|
5759
5788
|
# to further shrink the batch size so that there are no more than
|
|
@@ -5812,12 +5841,12 @@ class SQLCompiler(Compiled):
|
|
|
5812
5841
|
formatted = formatted.replace(
|
|
5813
5842
|
self.bindtemplate % {"name": key},
|
|
5814
5843
|
self.bindtemplate
|
|
5815
|
-
% {"name": f"{key}
|
|
5844
|
+
% {"name": f"{key}__[EXECMANY_INDEX]"},
|
|
5816
5845
|
)
|
|
5817
5846
|
return formatted
|
|
5818
5847
|
|
|
5819
5848
|
if imv.embed_values_counter:
|
|
5820
|
-
imv_values_counter = ",
|
|
5849
|
+
imv_values_counter = ", __[IMV_VALUES_COUNTER]"
|
|
5821
5850
|
else:
|
|
5822
5851
|
imv_values_counter = ""
|
|
5823
5852
|
formatted_values_clause = f"""({', '.join(
|
|
@@ -5843,7 +5872,7 @@ class SQLCompiler(Compiled):
|
|
|
5843
5872
|
|
|
5844
5873
|
if imv.embed_values_counter:
|
|
5845
5874
|
executemany_values_w_comma = (
|
|
5846
|
-
f"({imv_single_values_expr},
|
|
5875
|
+
f"({imv_single_values_expr}, __[IMV_VALUES_COUNTER]), "
|
|
5847
5876
|
)
|
|
5848
5877
|
else:
|
|
5849
5878
|
executemany_values_w_comma = f"({imv_single_values_expr}), "
|
|
@@ -5926,7 +5955,7 @@ class SQLCompiler(Compiled):
|
|
|
5926
5955
|
expanded_values_string = (
|
|
5927
5956
|
"".join(
|
|
5928
5957
|
executemany_values_w_comma.replace(
|
|
5929
|
-
"
|
|
5958
|
+
"__[IMV_VALUES_COUNTER]", str(i)
|
|
5930
5959
|
)
|
|
5931
5960
|
for i, _ in enumerate(batch)
|
|
5932
5961
|
)
|
|
@@ -5960,7 +5989,7 @@ class SQLCompiler(Compiled):
|
|
|
5960
5989
|
expanded_values_string = expanded_values_string % positions
|
|
5961
5990
|
|
|
5962
5991
|
replaced_statement = statement.replace(
|
|
5963
|
-
"
|
|
5992
|
+
"__[EXECMANY_VALUES]", expanded_values_string
|
|
5964
5993
|
)
|
|
5965
5994
|
|
|
5966
5995
|
replaced_parameters = tuple(
|
|
@@ -5979,10 +6008,10 @@ class SQLCompiler(Compiled):
|
|
|
5979
6008
|
|
|
5980
6009
|
for i, param in enumerate(batch):
|
|
5981
6010
|
fmv = formatted_values_clause.replace(
|
|
5982
|
-
"
|
|
6011
|
+
"__[EXECMANY_INDEX]", f"__{i}"
|
|
5983
6012
|
)
|
|
5984
6013
|
if imv.embed_values_counter:
|
|
5985
|
-
fmv = fmv.replace("
|
|
6014
|
+
fmv = fmv.replace("__[IMV_VALUES_COUNTER]", str(i))
|
|
5986
6015
|
|
|
5987
6016
|
replaced_values_clauses.append(fmv)
|
|
5988
6017
|
replaced_parameters.update(
|
|
@@ -5990,7 +6019,7 @@ class SQLCompiler(Compiled):
|
|
|
5990
6019
|
)
|
|
5991
6020
|
|
|
5992
6021
|
replaced_statement = statement.replace(
|
|
5993
|
-
"
|
|
6022
|
+
"__[EXECMANY_VALUES]",
|
|
5994
6023
|
", ".join(replaced_values_clauses),
|
|
5995
6024
|
)
|
|
5996
6025
|
|
|
@@ -7847,6 +7876,8 @@ class IdentifierPreparer:
|
|
|
7847
7876
|
quoting behavior.
|
|
7848
7877
|
"""
|
|
7849
7878
|
|
|
7879
|
+
_check_reserved_token(value, value, is_literal=False)
|
|
7880
|
+
|
|
7850
7881
|
return (
|
|
7851
7882
|
self.initial_quote
|
|
7852
7883
|
+ self._escape_identifier(value)
|
sqlalchemy/sql/functions.py
CHANGED
|
@@ -1050,6 +1050,17 @@ class _FunctionGenerator:
|
|
|
1050
1050
|
@property
|
|
1051
1051
|
def char_length(self) -> Type[_char_length_func]: ...
|
|
1052
1052
|
|
|
1053
|
+
# match a nullable ColumnElement first, so that its
|
|
1054
|
+
# None is removed rather than bound into _T
|
|
1055
|
+
|
|
1056
|
+
@overload
|
|
1057
|
+
def coalesce(
|
|
1058
|
+
self,
|
|
1059
|
+
col: ColumnElement[Optional[_T]],
|
|
1060
|
+
*args: _ColumnExpressionOrLiteralArgument[Any],
|
|
1061
|
+
**kwargs: Any,
|
|
1062
|
+
) -> _coalesce_func[_T]: ...
|
|
1063
|
+
|
|
1053
1064
|
# set ColumnElement[_T] as a separate overload, to appease
|
|
1054
1065
|
# mypy which seems to not want to accept _T from
|
|
1055
1066
|
# _ColumnExpressionArgument. Seems somewhat related to the covariant
|
|
@@ -1683,6 +1694,16 @@ class ReturnTypeFromArgs(GenericFunction[_T]):
|
|
|
1683
1694
|
class ReturnTypeFromOptionalArgs(ReturnTypeFromArgs[_T]):
|
|
1684
1695
|
inherit_cache = True
|
|
1685
1696
|
|
|
1697
|
+
# match a nullable ColumnElement first, so that its None is removed
|
|
1698
|
+
# rather than bound into _T
|
|
1699
|
+
@overload
|
|
1700
|
+
def __init__(
|
|
1701
|
+
self,
|
|
1702
|
+
col: ColumnElement[Optional[_T]],
|
|
1703
|
+
*args: _ColumnExpressionOrLiteralArgument[Any],
|
|
1704
|
+
**kwargs: Any,
|
|
1705
|
+
) -> None: ...
|
|
1706
|
+
|
|
1686
1707
|
@overload
|
|
1687
1708
|
def __init__(
|
|
1688
1709
|
self,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sqlalchemy/__init__.py,sha256=
|
|
1
|
+
sqlalchemy/__init__.py,sha256=UIIbXXwFUNE-4S4z4OnqHPp17NcrkEBj_6VZtTO3T7w,12659
|
|
2
2
|
sqlalchemy/events.py,sha256=vEDW04X_PMhMw5y0_95tbEzht3wua8_gnkMBJstYNRw,525
|
|
3
3
|
sqlalchemy/exc.py,sha256=JVVIizdjrbZYKA3poXDMSY5qDxTW8hwJzU_ZWx05LYc,23979
|
|
4
4
|
sqlalchemy/inspection.py,sha256=Rqw5kFWLY5MH3pr0j2f3OQGZca3aFR-NOaL2sRGuBBo,5064
|
|
@@ -22,12 +22,12 @@ sqlalchemy/dialects/_typing.py,sha256=oUmFIxU_AVXmJyRXiE5IsDvKFh8HvAcyiGMQaWmY7M
|
|
|
22
22
|
sqlalchemy/dialects/type_migration_guidelines.txt,sha256=-uHNdmYFGB7bzUNT6i8M5nb4j6j9YUKAtW4lcBZqsMg,8239
|
|
23
23
|
sqlalchemy/dialects/mssql/__init__.py,sha256=evBLzJ7Q0EHJpqkJUE99l51mL5ny-LfTQXqAj3vH3rI,1879
|
|
24
24
|
sqlalchemy/dialects/mssql/aioodbc.py,sha256=rFbdJJ7sRx0VIyGC17wQRBBLdemZTXXo7zUQ-AZla5E,2021
|
|
25
|
-
sqlalchemy/dialects/mssql/base.py,sha256=
|
|
25
|
+
sqlalchemy/dialects/mssql/base.py,sha256=SFm3t6wNCBLXaYdGMjK153AbmZ2VSugjg6KVHnsOpv0,136259
|
|
26
26
|
sqlalchemy/dialects/mssql/information_schema.py,sha256=maXUzFnv5Lt7o26li5G5mvdQ5MioeDFC0qVcPDS6_ok,8962
|
|
27
27
|
sqlalchemy/dialects/mssql/json.py,sha256=9CDNWSCvBMMQV_-vbqrxIgaoDK6PfvixJjPzERPkt8A,4756
|
|
28
28
|
sqlalchemy/dialects/mssql/provision.py,sha256=2TPp4mI_nVUBizOGjw0tXhiDrFBQwC-5oxqeyxarPeE,6480
|
|
29
29
|
sqlalchemy/dialects/mssql/pymssql.py,sha256=w4PUFJ0-en3scehaZWbPd6JnN9R_AM5qAMY9qU9VyF4,4098
|
|
30
|
-
sqlalchemy/dialects/mssql/pyodbc.py,sha256=
|
|
30
|
+
sqlalchemy/dialects/mssql/pyodbc.py,sha256=s5UL8h27X55RbVKon37dlPegE3lrFju7jDUwjAZuuJA,27262
|
|
31
31
|
sqlalchemy/dialects/mysql/__init__.py,sha256=XQz65UCpOpFR_NAxg6sM2zJgPmLEp16D_yEqgJPjirI,2206
|
|
32
32
|
sqlalchemy/dialects/mysql/aiomysql.py,sha256=hV5D9Mggliorocbirvk5DBV8b8dbWZI9KbCyYb1zemQ,8687
|
|
33
33
|
sqlalchemy/dialects/mysql/asyncmy.py,sha256=PjJwbyMwbAmu_lOfE22chxRuq4QlK2ARgKZRR4VaY_4,8052
|
|
@@ -42,7 +42,7 @@ sqlalchemy/dialects/mysql/mariadbconnector.py,sha256=ntpHnLKeGGWWpr99y1ZGlFOG9iw
|
|
|
42
42
|
sqlalchemy/dialects/mysql/mysqlconnector.py,sha256=N3HCWrei2ddojVEDgKBHOL5wYJgSCRSleJNCeOs-xLE,10100
|
|
43
43
|
sqlalchemy/dialects/mysql/mysqldb.py,sha256=_25trtahW3dtwcxcK8ksaxMWRUsjHKfQuZy_dmZXYmQ,9944
|
|
44
44
|
sqlalchemy/dialects/mysql/provision.py,sha256=pVIeBB4ZF5_jCLSJIphcQFWDxXo4opU7qS1cOkDhSGc,4816
|
|
45
|
-
sqlalchemy/dialects/mysql/pymysql.py,sha256=
|
|
45
|
+
sqlalchemy/dialects/mysql/pymysql.py,sha256=WnPXyDEslizOm25gDBEdee1w8xVSLm8FmVHWG3CaFSg,5735
|
|
46
46
|
sqlalchemy/dialects/mysql/pyodbc.py,sha256=092yrxp3BAYzhVJYGcRfqlQxk6obb8YwL2uwGKWS47I,5112
|
|
47
47
|
sqlalchemy/dialects/mysql/reflection.py,sha256=Vxlt1mrbB8vThPp2hzhaC8WqaBV5TLXlrodzzDv_DuE,24716
|
|
48
48
|
sqlalchemy/dialects/mysql/reserved_words.py,sha256=2pOnlrM0uJLHABpRMfijWOzHlGxFTmWznlPwNKHXphY,9236
|
|
@@ -58,7 +58,7 @@ sqlalchemy/dialects/oracle/vector.py,sha256=NbZL8IfduFWBjBgRplNL5Qy6kyKMO0QnQ7M3
|
|
|
58
58
|
sqlalchemy/dialects/postgresql/__init__.py,sha256=Nai79gxCtxM05bqCv4HT8PxN9tIedFse2g2k0G8Kj_o,3891
|
|
59
59
|
sqlalchemy/dialects/postgresql/_psycopg_common.py,sha256=1_Vb8JXRlNcCYoQn2Vgq6afvDiR6RJ77alGZUZEUbi8,6965
|
|
60
60
|
sqlalchemy/dialects/postgresql/array.py,sha256=cz42HV28g_VbH1Nt4TnEeU1GUS8uSCbTqU2CNJ4qDfg,17279
|
|
61
|
-
sqlalchemy/dialects/postgresql/asyncpg.py,sha256=
|
|
61
|
+
sqlalchemy/dialects/postgresql/asyncpg.py,sha256=vLXm1-EFSXIj0zVHmzPHCdHHr58lX5bQXYrpW7lA-RI,43926
|
|
62
62
|
sqlalchemy/dialects/postgresql/base.py,sha256=Cn0PP7Ds05oZ2zLJAaugHfso-wRAYMlCGy_iPMgNAzM,196499
|
|
63
63
|
sqlalchemy/dialects/postgresql/dml.py,sha256=kAnq3ZC-WBLgZTd0FQyKMkmmam7hxdw5Yxs-Um2j98A,12125
|
|
64
64
|
sqlalchemy/dialects/postgresql/ext.py,sha256=bh3FeNNZkPABqX7caCSzP_iNGNRL-gOLJsdeBiQpERs,17695
|
|
@@ -75,13 +75,13 @@ sqlalchemy/dialects/postgresql/psycopg2cffi.py,sha256=65Zmo9TIFOAULRfs24AzJFDxkh
|
|
|
75
75
|
sqlalchemy/dialects/postgresql/ranges.py,sha256=aIvHYRs-tKQkt8eJTmE3_JBaHxQA97WwFf7t6XLEfvQ,32946
|
|
76
76
|
sqlalchemy/dialects/postgresql/types.py,sha256=BNh6rvqDn0Uzn6IO8T-kGYYtv3W-axAg8OwIQDVNJF4,7629
|
|
77
77
|
sqlalchemy/dialects/sqlite/__init__.py,sha256=knYUrALP96JZpMecAoxmIouoJrRbGQ4KPkjGXlpzl14,1182
|
|
78
|
-
sqlalchemy/dialects/sqlite/aiosqlite.py,sha256=
|
|
78
|
+
sqlalchemy/dialects/sqlite/aiosqlite.py,sha256=gSekhNHrqJUg3u2SJEuyadNMIm1V3v-v-ahm4GWZN88,18601
|
|
79
79
|
sqlalchemy/dialects/sqlite/base.py,sha256=Hy16tYiG1QKafoIPqHVhMtJKXPMPqsCWhJXXGLVq1gY,109023
|
|
80
80
|
sqlalchemy/dialects/sqlite/dml.py,sha256=b4pV3f_7JMm2ZxuW906YQI7YcZiyHOYxqRKPge0cMaM,9138
|
|
81
81
|
sqlalchemy/dialects/sqlite/json.py,sha256=PuBnoOMcUcV0MUiXgC3mXCCv_iiglRhmX3ZUT3NiUx0,2777
|
|
82
82
|
sqlalchemy/dialects/sqlite/provision.py,sha256=0DEDRGGOrnie09Ub0TPUZjN_490WfBK_PXvHiMfJ8cw,6710
|
|
83
83
|
sqlalchemy/dialects/sqlite/pysqlcipher.py,sha256=eM5MfS7SfjV8xU5a_H9u5BYNTJOsoY62dH5N7mr9y7o,5481
|
|
84
|
-
sqlalchemy/dialects/sqlite/pysqlite.py,sha256=
|
|
84
|
+
sqlalchemy/dialects/sqlite/pysqlite.py,sha256=AyNCatl5xOpdjlzRJQ3l2K4myr_xdSzX7FwuKnaM57I,32721
|
|
85
85
|
sqlalchemy/engine/__init__.py,sha256=Nn05AJVAfZn_sToGjt09vBcZET343-wYwl-oo2Fg6R8,2818
|
|
86
86
|
sqlalchemy/engine/_py_processors.py,sha256=9vtsn7jB3QNIt3WQPOP4YjGbOEzGJUwnF_aj3eJxmxI,3743
|
|
87
87
|
sqlalchemy/engine/_py_row.py,sha256=IZvYZytnYiKykwAnpGv-rR5XsFBqoaApWdlZcg_H9yc,3787
|
|
@@ -106,7 +106,7 @@ sqlalchemy/event/api.py,sha256=s1qCAQ0yxC3W1erIvTt79QoEvOYo4u44xostJYaBWOs,8109
|
|
|
106
106
|
sqlalchemy/event/attr.py,sha256=8of8a-l3XuU3P3UM5mmuCsxmJ5HzL-MZujqJLaeP2LY,21590
|
|
107
107
|
sqlalchemy/event/base.py,sha256=3o2c0FFk-nb7qJtReSqHfmWsCqNKWoOyATYRz4wF0q0,15255
|
|
108
108
|
sqlalchemy/event/legacy.py,sha256=GHq4EbU7EG9PiXh1Me_qVlxA84n9vvl_Uuc5UyPDX9M,8458
|
|
109
|
-
sqlalchemy/event/registry.py,sha256=
|
|
109
|
+
sqlalchemy/event/registry.py,sha256=M6l9SnKQM34eeBIGuDkyS0GiYfDgFnUGpYuoZGwt-lI,11416
|
|
110
110
|
sqlalchemy/ext/__init__.py,sha256=Bg8EWR7ypWrYGcIBETUFAlUXeFB7MJNEh6VYQCmapD0,321
|
|
111
111
|
sqlalchemy/ext/associationproxy.py,sha256=XUFZRLyERtX-Y9iRXts5P0gO4Gr9DOMGfQNSHQ-yFRo,66444
|
|
112
112
|
sqlalchemy/ext/automap.py,sha256=LufHgwT37z-GzjuAYmJPC-wsBF0p_aqFhe-N_jYpEwI,61580
|
|
@@ -142,7 +142,7 @@ sqlalchemy/orm/_orm_constructors.py,sha256=-bHeVy7LoRNlUVbFFudOOlM4c20y581rSc3b1
|
|
|
142
142
|
sqlalchemy/orm/_typing.py,sha256=6Cpv7LlnboFzDRQqi3EB8f-6PsLk7NvFWM43KbwP-Ac,4973
|
|
143
143
|
sqlalchemy/orm/attributes.py,sha256=5B0fgSr2JLQbxMe8sgKOSkbpAX9Z7yFFpG0cIIwMFp4,93117
|
|
144
144
|
sqlalchemy/orm/base.py,sha256=ZllqtOLEOSzBujwuJge49rsaGNyOcWZIX1eDdf7-jgY,27501
|
|
145
|
-
sqlalchemy/orm/bulk_persistence.py,sha256=
|
|
145
|
+
sqlalchemy/orm/bulk_persistence.py,sha256=DXe0yKlN0gFOLQDxfWFzV9v9fZglBAU0vtGsXZwX8dU,75032
|
|
146
146
|
sqlalchemy/orm/clsregistry.py,sha256=mMpVBCC0YVTYf1uQ9u-YJnbRy4yfL5zeQV60tAjEuSs,17952
|
|
147
147
|
sqlalchemy/orm/collections.py,sha256=T0M6cg-R-n27CEPBVUz6m-CC6OVmmEziPCk56471_wA,52282
|
|
148
148
|
sqlalchemy/orm/context.py,sha256=0DgN8dSXlSp9HJq269_oZFc68wDQsOm2qVOeG4Y9LGc,118077
|
|
@@ -151,7 +151,7 @@ sqlalchemy/orm/decl_base.py,sha256=lprA841gO5WqkP2rUVp0TZF1_4R_Lzrqg8Pzq7HUpF0,8
|
|
|
151
151
|
sqlalchemy/orm/dependency.py,sha256=V0yXWc_T18mHsNSPdNCTJnVElE1DnMT51qzffHRnCGI,47782
|
|
152
152
|
sqlalchemy/orm/descriptor_props.py,sha256=_KkEziuEWU4CrxJBxb-5nblMAR6IP1WyzCRNRqSqyVE,37795
|
|
153
153
|
sqlalchemy/orm/dynamic.py,sha256=t3RyVwVcINQgJqAsvGPvzxVLAxv604FT4trNeLqdmpU,9949
|
|
154
|
-
sqlalchemy/orm/evaluator.py,sha256=
|
|
154
|
+
sqlalchemy/orm/evaluator.py,sha256=kvo5HGkitMMRiU4N1rSWPhZlAdQsFN032Q8nWsTB7YY,16165
|
|
155
155
|
sqlalchemy/orm/events.py,sha256=tSwC3ntuln8TLkFzZbe2DvycT3q0FQzWSTNxTApbcts,127180
|
|
156
156
|
sqlalchemy/orm/exc.py,sha256=W11TA2kDVVDweYvrDKwoqgFVO7wiIoFW_yHqDts7fGU,7636
|
|
157
157
|
sqlalchemy/orm/identity.py,sha256=kIgJgbN2MLaL3kc43-i1CA39eww7s3UXsv9xxijlQZo,9249
|
|
@@ -190,7 +190,7 @@ sqlalchemy/sql/annotation.py,sha256=y-vGSCbLJsrgLkkQL5M3_ytczOsyx4z32kDnpwReJDs,
|
|
|
190
190
|
sqlalchemy/sql/base.py,sha256=vmHGxJwz_cuYymAjuCsMnXIcZWDiYmV7Ynhy-GB3AsY,78976
|
|
191
191
|
sqlalchemy/sql/cache_key.py,sha256=AE0LHB3h-ukCE95svW9HUcM7rWUQWoJKe9TYW9pKxKc,33653
|
|
192
192
|
sqlalchemy/sql/coercions.py,sha256=9_GdOP59AflDIstWsDRPnJraJGVxS5B4lPfL-6iHfg0,40782
|
|
193
|
-
sqlalchemy/sql/compiler.py,sha256=
|
|
193
|
+
sqlalchemy/sql/compiler.py,sha256=MRrMFLYNRdPu50Y6p5ae-pGFDfBTOC1g5yWfDAZ-FnI,293025
|
|
194
194
|
sqlalchemy/sql/crud.py,sha256=nCFEdYyodH995HawyqFaIltIe2r3KKYAF9RrXgkw8WU,59880
|
|
195
195
|
sqlalchemy/sql/ddl.py,sha256=fJabeoCAj3Yc6RrmaiGBUiSnKG0xZe7eWZs5QgtJ2LI,47994
|
|
196
196
|
sqlalchemy/sql/default_comparator.py,sha256=jaxd49IC1flS349qPZ2ZcJhHl1ayA-BuWq52B4RaJew,16706
|
|
@@ -198,7 +198,7 @@ sqlalchemy/sql/dml.py,sha256=l64Mhi59_paz5h188vW07dUqGo-wXZ-V0_V8SEOdLpI,67039
|
|
|
198
198
|
sqlalchemy/sql/elements.py,sha256=dXOqP-PIflRJTzQcct_YumD5UCQqPVwyg8I_7b5O-nE,182077
|
|
199
199
|
sqlalchemy/sql/events.py,sha256=xpqx3irkG8N3gysXAViLCqXXke9KCSU-6w4zZUdYXzw,18312
|
|
200
200
|
sqlalchemy/sql/expression.py,sha256=ExolOUyIJ90eBZGpp0G5w29TXhJ0Vf4qyrKA-rKe9VU,7582
|
|
201
|
-
sqlalchemy/sql/functions.py,sha256=
|
|
201
|
+
sqlalchemy/sql/functions.py,sha256=WY6NjumAfGt-LxgjQnhX5xhlw927h1zTr0c81vgAnu8,69285
|
|
202
202
|
sqlalchemy/sql/lambdas.py,sha256=IiBq804zFJsne6eUsm9IjQNu_Ctl_xQjMHU5c9BjpRE,49391
|
|
203
203
|
sqlalchemy/sql/naming.py,sha256=w62T2yj6pafLNRe7SDUsutklHSYgIabXj2UtnaCJRSM,6855
|
|
204
204
|
sqlalchemy/sql/operators.py,sha256=7h8oPww8gIzqyhizpiW-iyVNSFCEWUouGyMlhG1kXac,76792
|
|
@@ -263,9 +263,9 @@ sqlalchemy/util/queue.py,sha256=N0y9hAQtvizeoFAfNPpkIajX2Y7ufw0MCsf6YR6iN94,1049
|
|
|
263
263
|
sqlalchemy/util/tool_support.py,sha256=iZSwvKdF5pA8UtXuwbtln6dEDgerKJWasELSi7q6Epw,6136
|
|
264
264
|
sqlalchemy/util/topological.py,sha256=yMpaA2s0JYIekQF4XKwzJzy8lVo-8yeo8o1J2xzxq48,3451
|
|
265
265
|
sqlalchemy/util/typing.py,sha256=ae0GtYSpsuoEIIn-tDlKtfRfUQ-x-IfX4p2zhf78m0w,22571
|
|
266
|
-
sqlalchemy-2.0.
|
|
267
|
-
sqlalchemy-2.0.
|
|
268
|
-
sqlalchemy-2.0.
|
|
269
|
-
sqlalchemy-2.0.
|
|
270
|
-
sqlalchemy-2.0.
|
|
271
|
-
sqlalchemy-2.0.
|
|
266
|
+
sqlalchemy-2.0.59.dist-info/licenses/AUTHORS,sha256=3B2wtdF0Va3De2k_-OQJyagPYD5EFpWCVRjDb3hslj4,492
|
|
267
|
+
sqlalchemy-2.0.59.dist-info/licenses/LICENSE,sha256=6GK7W5BPtVE8PhQojXoloS6w7MeEegqWXTEOmpVefLk,1100
|
|
268
|
+
sqlalchemy-2.0.59.dist-info/METADATA,sha256=RZY7piWvpduC0VWLQUd_22h12uyn13WqLYJavR8OiPw,9638
|
|
269
|
+
sqlalchemy-2.0.59.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
270
|
+
sqlalchemy-2.0.59.dist-info/top_level.txt,sha256=rp-ZgB7D8G11ivXON5VGPjupT1voYmWqkciDt5Uaw_Q,11
|
|
271
|
+
sqlalchemy-2.0.59.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|