SQLAlchemy 2.0.29__py3-none-any.whl → 2.0.30__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-2.0.29.dist-info → SQLAlchemy-2.0.30.dist-info}/METADATA +1 -1
- {SQLAlchemy-2.0.29.dist-info → SQLAlchemy-2.0.30.dist-info}/RECORD +35 -35
- sqlalchemy/__init__.py +1 -1
- sqlalchemy/connectors/asyncio.py +2 -6
- sqlalchemy/dialects/postgresql/psycopg.py +32 -0
- sqlalchemy/dialects/postgresql/psycopg2.py +1 -1
- sqlalchemy/engine/base.py +3 -7
- sqlalchemy/engine/characteristics.py +76 -2
- sqlalchemy/engine/cursor.py +13 -10
- sqlalchemy/engine/default.py +9 -4
- sqlalchemy/event/api.py +1 -1
- sqlalchemy/ext/automap.py +93 -60
- sqlalchemy/ext/hybrid.py +1 -1
- sqlalchemy/orm/bulk_persistence.py +7 -0
- sqlalchemy/orm/context.py +16 -4
- sqlalchemy/orm/decl_api.py +22 -14
- sqlalchemy/orm/loading.py +32 -15
- sqlalchemy/orm/mapper.py +2 -1
- sqlalchemy/orm/path_registry.py +14 -11
- sqlalchemy/orm/properties.py +1 -1
- sqlalchemy/orm/session.py +72 -20
- sqlalchemy/orm/strategy_options.py +15 -1
- sqlalchemy/sql/_elements_constructors.py +14 -7
- sqlalchemy/sql/_typing.py +5 -2
- sqlalchemy/sql/base.py +18 -13
- sqlalchemy/sql/compiler.py +8 -3
- sqlalchemy/sql/elements.py +45 -17
- sqlalchemy/sql/functions.py +4 -1
- sqlalchemy/sql/schema.py +32 -0
- sqlalchemy/sql/selectable.py +39 -20
- sqlalchemy/util/langhelpers.py +9 -12
- sqlalchemy/util/typing.py +1 -1
- {SQLAlchemy-2.0.29.dist-info → SQLAlchemy-2.0.30.dist-info}/LICENSE +0 -0
- {SQLAlchemy-2.0.29.dist-info → SQLAlchemy-2.0.30.dist-info}/WHEEL +0 -0
- {SQLAlchemy-2.0.29.dist-info → SQLAlchemy-2.0.30.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sqlalchemy/__init__.py,sha256=
|
|
1
|
+
sqlalchemy/__init__.py,sha256=yI12J_Tdp5kmBfaR8P8wQjcZg4U0qua6pbbB7JTvCsw,13033
|
|
2
2
|
sqlalchemy/events.py,sha256=k-ZD38aSPD29LYhED7CBqttp5MDVVx_YSaWC2-cu9ec,525
|
|
3
3
|
sqlalchemy/exc.py,sha256=M_8-O1hd8i6gbyx-TapV400p_Lxq2QqTGMXUAO-YgCc,23976
|
|
4
4
|
sqlalchemy/inspection.py,sha256=MF-LE358wZDUEl1IH8-Uwt2HI65EsQpQW5o5udHkZwA,5063
|
|
@@ -8,7 +8,7 @@ sqlalchemy/schema.py,sha256=dKiWmgHYjcKQ4TiiD6vD0UMmIsD8u0Fsor1M9AAeGUs,3194
|
|
|
8
8
|
sqlalchemy/types.py,sha256=cQFM-hFRmaf1GErun1qqgEs6QxufvzMuwKqj9tuMPpE,3168
|
|
9
9
|
sqlalchemy/connectors/__init__.py,sha256=PzXPqZqi3BzEnrs1eW0DcsR4lyknAzhhN9rWcQ97hb4,476
|
|
10
10
|
sqlalchemy/connectors/aioodbc.py,sha256=GSTiNMO9h0qjPxgqaxDwWZ8HvhWMFNVR6MJQnN1oc40,5288
|
|
11
|
-
sqlalchemy/connectors/asyncio.py,sha256=
|
|
11
|
+
sqlalchemy/connectors/asyncio.py,sha256=K3U5857TD0GmJXIhxgRljKnJhJNzYFhQ8UjyFX0Yyoo,5878
|
|
12
12
|
sqlalchemy/connectors/pyodbc.py,sha256=t7AjyxIOnaWg3CrlUEpBs4Y5l0HFdNt3P_cSSKhbi0Y,8501
|
|
13
13
|
sqlalchemy/cyextension/__init__.py,sha256=GzhhN8cjMnDTE0qerlUlpbrNmFPHQWCZ4Gk74OAxl04,244
|
|
14
14
|
sqlalchemy/cyextension/collections.pyx,sha256=L7DZ3DGKpgw2MT2ZZRRxCnrcyE5pU1NAFowWgAzQPEc,12571
|
|
@@ -68,8 +68,8 @@ sqlalchemy/dialects/postgresql/operators.py,sha256=NsAaWun_tL3d_be0fs9YL6T4LPKK6
|
|
|
68
68
|
sqlalchemy/dialects/postgresql/pg8000.py,sha256=3yoekiWSF-xnaWMqG76XrYPMqerg-42TdmfsW_ivK9E,18640
|
|
69
69
|
sqlalchemy/dialects/postgresql/pg_catalog.py,sha256=hY3NXEUHxTWD4umhd2aowNu3laC-61Q_qQ_pReyXTUM,9254
|
|
70
70
|
sqlalchemy/dialects/postgresql/provision.py,sha256=yqyx-aDFO9l2YcL9f4T5HBP_Lnt5dHsMjpuXUG8mi7A,5762
|
|
71
|
-
sqlalchemy/dialects/postgresql/psycopg.py,sha256=
|
|
72
|
-
sqlalchemy/dialects/postgresql/psycopg2.py,sha256=
|
|
71
|
+
sqlalchemy/dialects/postgresql/psycopg.py,sha256=3_xRoZ71mgTR-tYKDb6N0ebbrRD3dFwVRI5-ZuFFOg8,23378
|
|
72
|
+
sqlalchemy/dialects/postgresql/psycopg2.py,sha256=DbCB1-90O8YQDaIR67RtKOjzW3nvrdHoiwnVWYv_mX4,31605
|
|
73
73
|
sqlalchemy/dialects/postgresql/psycopg2cffi.py,sha256=M7wAYSL6Pvt-4nbfacAHGyyw4XMKJ_bQZ1tc1pBtIdg,1756
|
|
74
74
|
sqlalchemy/dialects/postgresql/ranges.py,sha256=6CgV7qkxEMJ9AQsiibo_XBLJYzGh-2ZxpG83sRaesVY,32949
|
|
75
75
|
sqlalchemy/dialects/postgresql/types.py,sha256=Jfxqw9JaKNOq29JRWBublywgb3lLMyzx8YZI7CXpS2s,7300
|
|
@@ -85,11 +85,11 @@ sqlalchemy/engine/__init__.py,sha256=Stb2oV6l8w65JvqEo6J4qtKoApcmOpXy3AAxQud4C1o
|
|
|
85
85
|
sqlalchemy/engine/_py_processors.py,sha256=j9i_lcYYQOYJMcsDerPxI0sVFBIlX5sqoYMdMJlgWPI,3744
|
|
86
86
|
sqlalchemy/engine/_py_row.py,sha256=wSqoUFzLOJ1f89kgDb6sJm9LUrF5LMFpXPcK1vUsKcs,3787
|
|
87
87
|
sqlalchemy/engine/_py_util.py,sha256=f2DI3AN1kv6EplelowesCVpwS8hSXNufRkZoQmJtSH8,2484
|
|
88
|
-
sqlalchemy/engine/base.py,sha256=
|
|
89
|
-
sqlalchemy/engine/characteristics.py,sha256=
|
|
88
|
+
sqlalchemy/engine/base.py,sha256=0jDuJYb1tipD-N9chnMCvd25JySJQCm8CDCt_lobmv0,122898
|
|
89
|
+
sqlalchemy/engine/characteristics.py,sha256=N3kbvw_ApMh86wb5yAGnxtPYD4YRhYMWion1H_aVZBI,4765
|
|
90
90
|
sqlalchemy/engine/create.py,sha256=mYJtOG2ZKM8sgyfjpGpamW15RDU7JXi5s6iibbJHMIs,33206
|
|
91
|
-
sqlalchemy/engine/cursor.py,sha256=
|
|
92
|
-
sqlalchemy/engine/default.py,sha256=
|
|
91
|
+
sqlalchemy/engine/cursor.py,sha256=cFq61yrw76k-QR_xNUBWuL-Zeyb14ltG-6jo2Q2iuuw,76392
|
|
92
|
+
sqlalchemy/engine/default.py,sha256=B3i9Ce3Jk64CtNaS1gnes4uCMhiQn2cMwnZh5RxR-aE,84137
|
|
93
93
|
sqlalchemy/engine/events.py,sha256=c0unNFFiHzTAvkUtXoJaxzMFMDwurBkHiiUhuN8qluc,37381
|
|
94
94
|
sqlalchemy/engine/interfaces.py,sha256=n6G7VW5kaGyBlKdCkgaDs694tfzLPOxZeboDmVaJThg,112832
|
|
95
95
|
sqlalchemy/engine/mock.py,sha256=yvpxgFmRw5G4QsHeF-ZwQGHKES-HqQOucTxFtN1uzdk,4179
|
|
@@ -101,18 +101,18 @@ sqlalchemy/engine/strategies.py,sha256=DqFSWaXJPL-29Omot9O0aOcuGL8KmCGyOvnPGDkAJ
|
|
|
101
101
|
sqlalchemy/engine/url.py,sha256=8eWkUaIUyDExOcJ2D4xJXRcn4OY1GQJ3Q2duSX6UGAg,30784
|
|
102
102
|
sqlalchemy/engine/util.py,sha256=bNirO8k1S8yOW61uNH-a9QrWtAJ9VGFgbiR0lk1lUQU,5682
|
|
103
103
|
sqlalchemy/event/__init__.py,sha256=KBrp622xojnC3FFquxa2JsMamwAbfkvzfv6Op0NKiYc,997
|
|
104
|
-
sqlalchemy/event/api.py,sha256=
|
|
104
|
+
sqlalchemy/event/api.py,sha256=DtDVgjKSorOfp9MGJ7fgMWrj4seC_hkwF4D8CW1RFZU,8226
|
|
105
105
|
sqlalchemy/event/attr.py,sha256=X8QeHGK4ioSYht1vkhc11f606_mq_t91jMNIT314ubs,20751
|
|
106
106
|
sqlalchemy/event/base.py,sha256=3n9FmUkcXYHHyGzfpjKDsrIUVCNST_hq4zOtrNm0_a4,14954
|
|
107
107
|
sqlalchemy/event/legacy.py,sha256=teMPs00fO-4g8a_z2omcVKkYce5wj_1uvJO2n2MIeuo,8227
|
|
108
108
|
sqlalchemy/event/registry.py,sha256=nfTSSyhjZZXc5wseWB4sXn-YibSc0LKX8mg17XlWmAo,10835
|
|
109
109
|
sqlalchemy/ext/__init__.py,sha256=S1fGKAbycnQDV01gs-JWGaFQ9GCD4QHwKcU2wnugg_o,322
|
|
110
110
|
sqlalchemy/ext/associationproxy.py,sha256=5O5ANHARO8jytvqBQmOu-QjNVE4Hh3tfYquqKAj5ajs,65771
|
|
111
|
-
sqlalchemy/ext/automap.py,sha256=
|
|
111
|
+
sqlalchemy/ext/automap.py,sha256=cMs3mMXZBbfQXahxHbT3-6h5uMM--GZIcdtwhRrZoio,61589
|
|
112
112
|
sqlalchemy/ext/baked.py,sha256=H6T1il7GY84BhzPFj49UECSpZh_eBuiHomA-QIsYOYQ,17807
|
|
113
113
|
sqlalchemy/ext/compiler.py,sha256=ONPoxoKD2yUS9R2-oOhmPsA7efm-Bs0BXo7HE1dGlsU,20391
|
|
114
114
|
sqlalchemy/ext/horizontal_shard.py,sha256=wuwAPnHymln0unSBnyx-cpX0AfESKSsypaSQTYCvzDk,16750
|
|
115
|
-
sqlalchemy/ext/hybrid.py,sha256=
|
|
115
|
+
sqlalchemy/ext/hybrid.py,sha256=IYkCaPZ29gm2cPKPg0cWMkLCEqMykD8-JJTvgacGbmc,52458
|
|
116
116
|
sqlalchemy/ext/indexable.py,sha256=UkTelbydKCdKelzbv3HWFFavoET9WocKaGRPGEOVfN8,11032
|
|
117
117
|
sqlalchemy/ext/instrumentation.py,sha256=sg8ghDjdHSODFXh_jAmpgemnNX1rxCeeXEG3-PMdrNk,15707
|
|
118
118
|
sqlalchemy/ext/mutable.py,sha256=L5ZkHBGYhMaqO75Xtyrk2DBR44RDk0g6Rz2HzHH0F8Q,37355
|
|
@@ -141,11 +141,11 @@ sqlalchemy/orm/_orm_constructors.py,sha256=tlTZoY87CFSBpnw7iIYKTCeofjLg-r2ibfCfM
|
|
|
141
141
|
sqlalchemy/orm/_typing.py,sha256=DVBfpHmDVK4x1zxaGJPY2GoTrAsyR6uexv20Lzf1afc,4973
|
|
142
142
|
sqlalchemy/orm/attributes.py,sha256=wGpyY9aIxWRkL3y6qlbUgIW78rGA4X38ZhOaWI9S818,92535
|
|
143
143
|
sqlalchemy/orm/base.py,sha256=re6A8ooMxLyfCAeQfhBwwxeJQkiH7EtzzOZIVIiTPlw,27466
|
|
144
|
-
sqlalchemy/orm/bulk_persistence.py,sha256=
|
|
144
|
+
sqlalchemy/orm/bulk_persistence.py,sha256=wU204OQK-V6rJfpc3HPeMAA1X9vZg9nSNpI1zKuZtcY,70086
|
|
145
145
|
sqlalchemy/orm/clsregistry.py,sha256=29LyYiuj0qbebOpgW6DbBPNB2ikTweFQar1byCst7I0,17958
|
|
146
146
|
sqlalchemy/orm/collections.py,sha256=jpMsJGVixmrW9kfT8wevm9kpatKRqyDLcqWd7CjKPxE,52179
|
|
147
|
-
sqlalchemy/orm/context.py,sha256=
|
|
148
|
-
sqlalchemy/orm/decl_api.py,sha256=
|
|
147
|
+
sqlalchemy/orm/context.py,sha256=pFFc-1ZjaV3aQMAO27UIh0W6NyLc30n2IbuWNprMtS8,112445
|
|
148
|
+
sqlalchemy/orm/decl_api.py,sha256=_WPKQ_vSE5k2TLtNmkaxxYmvbhZvkRMrrvCeDxdqDQE,63998
|
|
149
149
|
sqlalchemy/orm/decl_base.py,sha256=Tq6I3Jm3bkM01mmoiHfdFXLE94YDk1ik2u2dXL1RxLc,81601
|
|
150
150
|
sqlalchemy/orm/dependency.py,sha256=hgjksUWhgbmgHK5GdJdiDCBgDAIGQXIrY-Tj79tbL2k,47631
|
|
151
151
|
sqlalchemy/orm/descriptor_props.py,sha256=pKtpP7H1LB_YuHRVrEYpfFZybEnUUdPwQXxduYFe2hA,37180
|
|
@@ -156,20 +156,20 @@ sqlalchemy/orm/exc.py,sha256=IP40P-wOeXhkYk0YizuTC3wqm6W9cPTaQU08f5MMaQ0,7413
|
|
|
156
156
|
sqlalchemy/orm/identity.py,sha256=jHdCxCpCyda_8mFOfGmN_Pr0XZdKiU-2hFZshlNxbHs,9249
|
|
157
157
|
sqlalchemy/orm/instrumentation.py,sha256=M-kZmkUvHUxtf-0mCA8RIM5QmMH1hWlYR_pKMwaidjA,24321
|
|
158
158
|
sqlalchemy/orm/interfaces.py,sha256=Hmf1BjbfOarZRgMlruqghR7cgH2xyugA9v5t0x-a-wU,48502
|
|
159
|
-
sqlalchemy/orm/loading.py,sha256=
|
|
159
|
+
sqlalchemy/orm/loading.py,sha256=9RacpzFOWbuKgPRWHFmyIvD4fYCLAnkpwBFASyQ2CoI,58277
|
|
160
160
|
sqlalchemy/orm/mapped_collection.py,sha256=3cneB1dfPTLrsTvKoo9_oCY2xtq4UAHfe5WSXPyqIS4,19690
|
|
161
|
-
sqlalchemy/orm/mapper.py,sha256=
|
|
162
|
-
sqlalchemy/orm/path_registry.py,sha256=
|
|
161
|
+
sqlalchemy/orm/mapper.py,sha256=bfoRzNKKnjF-CDvr2Df7HZC9TepvtuQ49LRz_fW7DGQ,171088
|
|
162
|
+
sqlalchemy/orm/path_registry.py,sha256=sJZMv_WPqUpHfQtKWaX3WYFeKBcNJ8C3wOM2mkBGkTE,25920
|
|
163
163
|
sqlalchemy/orm/persistence.py,sha256=dzyB2JOXNwQgaCbN8kh0sEz00WFePr48qf8NWVCUZH8,61701
|
|
164
|
-
sqlalchemy/orm/properties.py,sha256=
|
|
164
|
+
sqlalchemy/orm/properties.py,sha256=eDPFzxYUgdM3uWjHywnb1XW-i0tVKKyx7A2MCD31GQU,29306
|
|
165
165
|
sqlalchemy/orm/query.py,sha256=qKuFTUlbGVjs84AQ7APBY0PJhrzc2JJ1upeI658MV_o,117596
|
|
166
166
|
sqlalchemy/orm/relationships.py,sha256=dS5SY0v1MiD7iCNnAQlHaI6prUQhL5EkXT7ijc8FR8E,128644
|
|
167
167
|
sqlalchemy/orm/scoping.py,sha256=gFYywLeMmd5qjFdVPzeuCX727mTaChrCv8aqn4wPke0,78677
|
|
168
|
-
sqlalchemy/orm/session.py,sha256=
|
|
168
|
+
sqlalchemy/orm/session.py,sha256=Da-wd01Rw5fCqRr05RBY3dath-ssdloB4BvVrTVy8LA,195250
|
|
169
169
|
sqlalchemy/orm/state.py,sha256=mW2f1hMSNeTJ89foutOE1EqLLD6DZkrSeO-pgagZweg,37520
|
|
170
170
|
sqlalchemy/orm/state_changes.py,sha256=qKYg7NxwrDkuUY3EPygAztym6oAVUFcP2wXn7QD3Mz4,6815
|
|
171
171
|
sqlalchemy/orm/strategies.py,sha256=OtmMtWpCDk4ZiaM_ipzGn80sPOi6Opwj3Co4lUHpd_w,114206
|
|
172
|
-
sqlalchemy/orm/strategy_options.py,sha256=
|
|
172
|
+
sqlalchemy/orm/strategy_options.py,sha256=tFDJllL8Evxo2UjpyMkrxxRdphaclM-FBUd9O8WArdY,85366
|
|
173
173
|
sqlalchemy/orm/sync.py,sha256=g7iZfSge1HgxMk9SKRgUgtHEbpbZ1kP_CBqOIdTOXqc,5779
|
|
174
174
|
sqlalchemy/orm/unitofwork.py,sha256=fiVaqcymbDDHRa1NjS90N9Z466nd5pkJOEi1dHO6QLY,27033
|
|
175
175
|
sqlalchemy/orm/util.py,sha256=PvU_J4PSNcaOoNnsLY9qZ0lcElG71ykvdZSDZ76WSwg,80660
|
|
@@ -180,30 +180,30 @@ sqlalchemy/pool/events.py,sha256=xGjkIUZl490ZDtCHqnQF9ZCwe2Jv93eGXmnQxftB11E,131
|
|
|
180
180
|
sqlalchemy/pool/impl.py,sha256=JwpALSkH-pCoO_6oENbkHYY00Jx9nlttyoI61LivRNc,18944
|
|
181
181
|
sqlalchemy/sql/__init__.py,sha256=UNa9EUiYWoPayf-FzNcwVgQvpsBdInPZfpJesAStN9o,5820
|
|
182
182
|
sqlalchemy/sql/_dml_constructors.py,sha256=YdBJex0MCVACv4q2nl_ii3uhxzwU6aDB8zAsratX5UQ,3867
|
|
183
|
-
sqlalchemy/sql/_elements_constructors.py,sha256=
|
|
183
|
+
sqlalchemy/sql/_elements_constructors.py,sha256=1SX6o1ezeB8C9DAa2m0WxmfhM3ji3FeCprXFQkNerNY,63048
|
|
184
184
|
sqlalchemy/sql/_orm_types.py,sha256=T-vjcry4C1y0GToFKVxQCnmly_-Zsq4IO4SHN6bvUF4,625
|
|
185
185
|
sqlalchemy/sql/_py_util.py,sha256=hiM9ePbRSGs60bAMxPFuJCIC_p9SQ1VzqXGiPchiYwE,2173
|
|
186
186
|
sqlalchemy/sql/_selectable_constructors.py,sha256=wjE6HrLm9cR7bxvZXT8sFLUqT6t_J9G1XyQCnYmBDl0,18780
|
|
187
|
-
sqlalchemy/sql/_typing.py,sha256=
|
|
187
|
+
sqlalchemy/sql/_typing.py,sha256=oqwrYHVMtK-AuKGH9c4SgfiOEJUt5vjkzSEzzscMHkM,12771
|
|
188
188
|
sqlalchemy/sql/annotation.py,sha256=aqbbVz9kfbCT3_66CZ9GEirVN197Cukoqt8rq48FgkQ,18245
|
|
189
|
-
sqlalchemy/sql/base.py,sha256=
|
|
189
|
+
sqlalchemy/sql/base.py,sha256=Lg7iHywXmB7XuRMar45XSM4KayChGhfj1c8E7nWUJdo,73899
|
|
190
190
|
sqlalchemy/sql/cache_key.py,sha256=0Db8mR8IrpBgdzXs4TGTt98LOpL3c7KABd72MAPKUQQ,33668
|
|
191
191
|
sqlalchemy/sql/coercions.py,sha256=1xzN_9U5BCJGgokdc5iYj5o2cMAfEEZkr1Oa9Q-JYj8,40493
|
|
192
|
-
sqlalchemy/sql/compiler.py,sha256=
|
|
192
|
+
sqlalchemy/sql/compiler.py,sha256=e5XWUmeZnE3O8r7fndfmXjAze3qlFZY223BHqrso0AY,274647
|
|
193
193
|
sqlalchemy/sql/crud.py,sha256=g9xcol2KRGjZi1qsb2-bVz8zgVy_53gfMtJcnNO2vyQ,56521
|
|
194
194
|
sqlalchemy/sql/ddl.py,sha256=CIqMilCKfuQnF0lrZsQdTxgrbXqcTauKr0Ojzj77PFQ,45602
|
|
195
195
|
sqlalchemy/sql/default_comparator.py,sha256=utXWsZVGEjflhFfCT4ywa6RnhORc1Rryo87Hga71Rps,16707
|
|
196
196
|
sqlalchemy/sql/dml.py,sha256=pn0Lm1ofC5qVZzwGWFW73lPCiNba8OsTeemurJgwRyg,65614
|
|
197
|
-
sqlalchemy/sql/elements.py,sha256=
|
|
197
|
+
sqlalchemy/sql/elements.py,sha256=coAHu2qUNrEKOv0ZvnDsc3G8_6o9lciylZn-K6fJDXU,174621
|
|
198
198
|
sqlalchemy/sql/events.py,sha256=iC_Q1Htm1Aobt5tOYxWfHHqNpoytrULORmUKcusH_-E,18290
|
|
199
199
|
sqlalchemy/sql/expression.py,sha256=VMX-dLpsZYnVRJpYNDozDUgaj7iQ0HuewUKVefD57PE,7586
|
|
200
|
-
sqlalchemy/sql/functions.py,sha256=
|
|
200
|
+
sqlalchemy/sql/functions.py,sha256=kMMYplvuIHFAPwxBI03SizwaLcYEHzysecWk-R1V-JM,63762
|
|
201
201
|
sqlalchemy/sql/lambdas.py,sha256=DP0Qz7Ypo8QhzMwygGHYgRhwJMx-rNezO1euouH3iYU,49292
|
|
202
202
|
sqlalchemy/sql/naming.py,sha256=ZHs1qSV3ou8TYmZ92uvU3sfdklUQlIz4uhe330n05SU,6858
|
|
203
203
|
sqlalchemy/sql/operators.py,sha256=r4oQp4h5zTMFFOpiFNV56joIK-QIjJCobatsmaZ-724,75935
|
|
204
204
|
sqlalchemy/sql/roles.py,sha256=pOsVn_OZD7mF2gJByHf24Rjopt0_Hu3dUCEOK5t4KS8,7662
|
|
205
|
-
sqlalchemy/sql/schema.py,sha256=
|
|
206
|
-
sqlalchemy/sql/selectable.py,sha256=
|
|
205
|
+
sqlalchemy/sql/schema.py,sha256=GctEXTYd5R9nqS07xgf5uFC-_3UIZJ7q3RaetzSs0Pk,229225
|
|
206
|
+
sqlalchemy/sql/selectable.py,sha256=XHL0xJeLWnQeGG_dK7zQ8lNsCGdP8DeJQuCF4bCW-bo,233505
|
|
207
207
|
sqlalchemy/sql/sqltypes.py,sha256=AAXED0rebCNmrY8K8kL6zox8_GD0L_p0lRzwM3SxCGk,126076
|
|
208
208
|
sqlalchemy/sql/traversals.py,sha256=NFgJrVJzInO3HrnG90CklxrDXhFydZohPs2vRJkh3Bo,33589
|
|
209
209
|
sqlalchemy/sql/type_api.py,sha256=CJAvRix_rRoOsE77sH4BqeGX0lIdtk8dX-StjGx3mUo,83208
|
|
@@ -255,14 +255,14 @@ sqlalchemy/util/_py_collections.py,sha256=U6L5AoyLdgSv7cdqB4xxQbw1rpeJjyOZVXffgx
|
|
|
255
255
|
sqlalchemy/util/compat.py,sha256=R6bpBydldtbr6h7oJePihQxFb7jKiI-YDsK465MSOzk,8714
|
|
256
256
|
sqlalchemy/util/concurrency.py,sha256=9lT_cMoO1fZNdY8QTUZ22oeSf-L5I-79Ke7chcBNPA0,3304
|
|
257
257
|
sqlalchemy/util/deprecations.py,sha256=YBwvvYhSB8LhasIZRKvg_-WNoVhPUcaYI1ZrnjDn868,11971
|
|
258
|
-
sqlalchemy/util/langhelpers.py,sha256=
|
|
258
|
+
sqlalchemy/util/langhelpers.py,sha256=kT7kwtTOPzHUFs6PhM1IEoW5ioeuFUFg2pjHSbH4d94,64891
|
|
259
259
|
sqlalchemy/util/preloaded.py,sha256=az7NmLJLsqs0mtM9uBkIu10-841RYDq8wOyqJ7xXvqE,5904
|
|
260
260
|
sqlalchemy/util/queue.py,sha256=CaeSEaYZ57YwtmLdNdOIjT5PK_LCuwMFiO0mpp39ybM,10185
|
|
261
261
|
sqlalchemy/util/tool_support.py,sha256=9braZyidaiNrZVsWtGmkSmus50-byhuYrlAqvhjcmnA,6135
|
|
262
262
|
sqlalchemy/util/topological.py,sha256=N3M3Le7KzGHCmqPGg0ZBqixTDGwmFLhOZvBtc4rHL_g,3458
|
|
263
|
-
sqlalchemy/util/typing.py,sha256=
|
|
264
|
-
SQLAlchemy-2.0.
|
|
265
|
-
SQLAlchemy-2.0.
|
|
266
|
-
SQLAlchemy-2.0.
|
|
267
|
-
SQLAlchemy-2.0.
|
|
268
|
-
SQLAlchemy-2.0.
|
|
263
|
+
sqlalchemy/util/typing.py,sha256=UctfgugSTnFJgZraikXJbB-5RoV7oyccZmbf2NeRfoA,16671
|
|
264
|
+
SQLAlchemy-2.0.30.dist-info/LICENSE,sha256=PA9Zq4h9BB3mpOUv_j6e212VIt6Qn66abNettue-MpM,1100
|
|
265
|
+
SQLAlchemy-2.0.30.dist-info/METADATA,sha256=je_u9qkpPX36jMg6zWrd8VjcEuly2P0zmsxfGP9GAHE,9602
|
|
266
|
+
SQLAlchemy-2.0.30.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
267
|
+
SQLAlchemy-2.0.30.dist-info/top_level.txt,sha256=rp-ZgB7D8G11ivXON5VGPjupT1voYmWqkciDt5Uaw_Q,11
|
|
268
|
+
SQLAlchemy-2.0.30.dist-info/RECORD,,
|
sqlalchemy/__init__.py
CHANGED
sqlalchemy/connectors/asyncio.py
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
from __future__ import annotations
|
|
12
12
|
|
|
13
13
|
import collections
|
|
14
|
-
import itertools
|
|
15
14
|
|
|
16
15
|
from ..engine import AdaptedConnection
|
|
17
16
|
from ..util.concurrency import asyncio
|
|
@@ -114,11 +113,8 @@ class AsyncAdapt_dbapi_cursor:
|
|
|
114
113
|
def fetchmany(self, size=None):
|
|
115
114
|
if size is None:
|
|
116
115
|
size = self.arraysize
|
|
117
|
-
|
|
118
|
-
rr
|
|
119
|
-
retval = list(itertools.islice(rr, 0, size))
|
|
120
|
-
self._rows = collections.deque(rr)
|
|
121
|
-
return retval
|
|
116
|
+
rr = self._rows
|
|
117
|
+
return [rr.popleft() for _ in range(min(size, len(rr)))]
|
|
122
118
|
|
|
123
119
|
def fetchall(self):
|
|
124
120
|
retval = list(self._rows)
|
|
@@ -50,6 +50,38 @@ The asyncio version of the dialect may also be specified explicitly using the
|
|
|
50
50
|
dialect shares most of its behavior with the ``psycopg2`` dialect.
|
|
51
51
|
Further documentation is available there.
|
|
52
52
|
|
|
53
|
+
Using a different Cursor class
|
|
54
|
+
------------------------------
|
|
55
|
+
|
|
56
|
+
One of the differences between ``psycopg`` and the older ``psycopg2``
|
|
57
|
+
is how bound parameters are handled: ``psycopg2`` would bind them
|
|
58
|
+
client side, while ``psycopg`` by default will bind them server side.
|
|
59
|
+
|
|
60
|
+
It's possible to configure ``psycopg`` to do client side binding by
|
|
61
|
+
specifying the ``cursor_factory`` to be ``ClientCursor`` when creating
|
|
62
|
+
the engine::
|
|
63
|
+
|
|
64
|
+
from psycopg import ClientCursor
|
|
65
|
+
|
|
66
|
+
client_side_engine = create_engine(
|
|
67
|
+
"postgresql+psycopg://...",
|
|
68
|
+
connect_args={"cursor_factory": ClientCursor},
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
Similarly when using an async engine the ``AsyncClientCursor`` can be
|
|
72
|
+
specified::
|
|
73
|
+
|
|
74
|
+
from psycopg import AsyncClientCursor
|
|
75
|
+
|
|
76
|
+
client_side_engine = create_async_engine(
|
|
77
|
+
"postgresql+psycopg://...",
|
|
78
|
+
connect_args={"cursor_factory": AsyncClientCursor},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
.. seealso::
|
|
82
|
+
|
|
83
|
+
`Client-side-binding cursors <https://www.psycopg.org/psycopg3/docs/advanced/cursors.html#client-side-binding-cursors>`_
|
|
84
|
+
|
|
53
85
|
""" # noqa
|
|
54
86
|
from __future__ import annotations
|
|
55
87
|
|
|
@@ -242,7 +242,7 @@ Psycopg2 Fast Execution Helpers
|
|
|
242
242
|
|
|
243
243
|
Modern versions of psycopg2 include a feature known as
|
|
244
244
|
`Fast Execution Helpers \
|
|
245
|
-
<https://
|
|
245
|
+
<https://www.psycopg.org/docs/extras.html#fast-execution-helpers>`_, which
|
|
246
246
|
have been shown in benchmarking to improve psycopg2's executemany()
|
|
247
247
|
performance, primarily with INSERT statements, by at least
|
|
248
248
|
an order of magnitude.
|
sqlalchemy/engine/base.py
CHANGED
|
@@ -174,13 +174,9 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]):
|
|
|
174
174
|
if self._has_events or self.engine._has_events:
|
|
175
175
|
self.dispatch.engine_connect(self)
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
token = self._execution_options["logging_token"]
|
|
181
|
-
return lambda msg: "[%s] %s" % (token, msg)
|
|
182
|
-
else:
|
|
183
|
-
return None
|
|
177
|
+
# this can be assigned differently via
|
|
178
|
+
# characteristics.LoggingTokenCharacteristic
|
|
179
|
+
_message_formatter: Any = None
|
|
184
180
|
|
|
185
181
|
def _log_info(self, message: str, *arg: Any, **kw: Any) -> None:
|
|
186
182
|
fmt = self._message_formatter
|
|
@@ -12,6 +12,7 @@ from typing import Any
|
|
|
12
12
|
from typing import ClassVar
|
|
13
13
|
|
|
14
14
|
if typing.TYPE_CHECKING:
|
|
15
|
+
from .base import Connection
|
|
15
16
|
from .interfaces import DBAPIConnection
|
|
16
17
|
from .interfaces import Dialect
|
|
17
18
|
|
|
@@ -44,13 +45,30 @@ class ConnectionCharacteristic(abc.ABC):
|
|
|
44
45
|
def reset_characteristic(
|
|
45
46
|
self, dialect: Dialect, dbapi_conn: DBAPIConnection
|
|
46
47
|
) -> None:
|
|
47
|
-
"""Reset the characteristic on the connection to its default
|
|
48
|
+
"""Reset the characteristic on the DBAPI connection to its default
|
|
49
|
+
value."""
|
|
48
50
|
|
|
49
51
|
@abc.abstractmethod
|
|
50
52
|
def set_characteristic(
|
|
51
53
|
self, dialect: Dialect, dbapi_conn: DBAPIConnection, value: Any
|
|
52
54
|
) -> None:
|
|
53
|
-
"""set characteristic on the connection to a given value."""
|
|
55
|
+
"""set characteristic on the DBAPI connection to a given value."""
|
|
56
|
+
|
|
57
|
+
def set_connection_characteristic(
|
|
58
|
+
self,
|
|
59
|
+
dialect: Dialect,
|
|
60
|
+
conn: Connection,
|
|
61
|
+
dbapi_conn: DBAPIConnection,
|
|
62
|
+
value: Any,
|
|
63
|
+
) -> None:
|
|
64
|
+
"""set characteristic on the :class:`_engine.Connection` to a given
|
|
65
|
+
value.
|
|
66
|
+
|
|
67
|
+
.. versionadded:: 2.0.30 - added to support elements that are local
|
|
68
|
+
to the :class:`_engine.Connection` itself.
|
|
69
|
+
|
|
70
|
+
"""
|
|
71
|
+
self.set_characteristic(dialect, dbapi_conn, value)
|
|
54
72
|
|
|
55
73
|
@abc.abstractmethod
|
|
56
74
|
def get_characteristic(
|
|
@@ -61,8 +79,22 @@ class ConnectionCharacteristic(abc.ABC):
|
|
|
61
79
|
|
|
62
80
|
"""
|
|
63
81
|
|
|
82
|
+
def get_connection_characteristic(
|
|
83
|
+
self, dialect: Dialect, conn: Connection, dbapi_conn: DBAPIConnection
|
|
84
|
+
) -> Any:
|
|
85
|
+
"""Given a :class:`_engine.Connection`, get the current value of the
|
|
86
|
+
characteristic.
|
|
87
|
+
|
|
88
|
+
.. versionadded:: 2.0.30 - added to support elements that are local
|
|
89
|
+
to the :class:`_engine.Connection` itself.
|
|
90
|
+
|
|
91
|
+
"""
|
|
92
|
+
return self.get_characteristic(dialect, dbapi_conn)
|
|
93
|
+
|
|
64
94
|
|
|
65
95
|
class IsolationLevelCharacteristic(ConnectionCharacteristic):
|
|
96
|
+
"""Manage the isolation level on a DBAPI connection"""
|
|
97
|
+
|
|
66
98
|
transactional: ClassVar[bool] = True
|
|
67
99
|
|
|
68
100
|
def reset_characteristic(
|
|
@@ -79,3 +111,45 @@ class IsolationLevelCharacteristic(ConnectionCharacteristic):
|
|
|
79
111
|
self, dialect: Dialect, dbapi_conn: DBAPIConnection
|
|
80
112
|
) -> Any:
|
|
81
113
|
return dialect.get_isolation_level(dbapi_conn)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class LoggingTokenCharacteristic(ConnectionCharacteristic):
|
|
117
|
+
"""Manage the 'logging_token' option of a :class:`_engine.Connection`.
|
|
118
|
+
|
|
119
|
+
.. versionadded:: 2.0.30
|
|
120
|
+
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
transactional: ClassVar[bool] = False
|
|
124
|
+
|
|
125
|
+
def reset_characteristic(
|
|
126
|
+
self, dialect: Dialect, dbapi_conn: DBAPIConnection
|
|
127
|
+
) -> None:
|
|
128
|
+
pass
|
|
129
|
+
|
|
130
|
+
def set_characteristic(
|
|
131
|
+
self, dialect: Dialect, dbapi_conn: DBAPIConnection, value: Any
|
|
132
|
+
) -> None:
|
|
133
|
+
raise NotImplementedError()
|
|
134
|
+
|
|
135
|
+
def set_connection_characteristic(
|
|
136
|
+
self,
|
|
137
|
+
dialect: Dialect,
|
|
138
|
+
conn: Connection,
|
|
139
|
+
dbapi_conn: DBAPIConnection,
|
|
140
|
+
value: Any,
|
|
141
|
+
) -> None:
|
|
142
|
+
if value:
|
|
143
|
+
conn._message_formatter = lambda msg: "[%s] %s" % (value, msg)
|
|
144
|
+
else:
|
|
145
|
+
del conn._message_formatter
|
|
146
|
+
|
|
147
|
+
def get_characteristic(
|
|
148
|
+
self, dialect: Dialect, dbapi_conn: DBAPIConnection
|
|
149
|
+
) -> Any:
|
|
150
|
+
raise NotImplementedError()
|
|
151
|
+
|
|
152
|
+
def get_connection_characteristic(
|
|
153
|
+
self, dialect: Dialect, conn: Connection, dbapi_conn: DBAPIConnection
|
|
154
|
+
) -> Any:
|
|
155
|
+
return conn._execution_options.get("logging_token", None)
|
sqlalchemy/engine/cursor.py
CHANGED
|
@@ -688,6 +688,7 @@ class CursorResultMetaData(ResultMetaData):
|
|
|
688
688
|
% (num_ctx_cols, len(cursor_description))
|
|
689
689
|
)
|
|
690
690
|
seen = set()
|
|
691
|
+
|
|
691
692
|
for (
|
|
692
693
|
idx,
|
|
693
694
|
colname,
|
|
@@ -1246,8 +1247,9 @@ class BufferedRowCursorFetchStrategy(CursorFetchStrategy):
|
|
|
1246
1247
|
if size is None:
|
|
1247
1248
|
return self.fetchall(result, dbapi_cursor)
|
|
1248
1249
|
|
|
1249
|
-
|
|
1250
|
-
lb = len(
|
|
1250
|
+
rb = self._rowbuffer
|
|
1251
|
+
lb = len(rb)
|
|
1252
|
+
close = False
|
|
1251
1253
|
if size > lb:
|
|
1252
1254
|
try:
|
|
1253
1255
|
new = dbapi_cursor.fetchmany(size - lb)
|
|
@@ -1255,13 +1257,15 @@ class BufferedRowCursorFetchStrategy(CursorFetchStrategy):
|
|
|
1255
1257
|
self.handle_exception(result, dbapi_cursor, e)
|
|
1256
1258
|
else:
|
|
1257
1259
|
if not new:
|
|
1258
|
-
|
|
1260
|
+
# defer closing since it may clear the row buffer
|
|
1261
|
+
close = True
|
|
1259
1262
|
else:
|
|
1260
|
-
|
|
1263
|
+
rb.extend(new)
|
|
1261
1264
|
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
+
res = [rb.popleft() for _ in range(min(size, len(rb)))]
|
|
1266
|
+
if close:
|
|
1267
|
+
result._soft_close()
|
|
1268
|
+
return res
|
|
1265
1269
|
|
|
1266
1270
|
def fetchall(self, result, dbapi_cursor):
|
|
1267
1271
|
try:
|
|
@@ -1315,9 +1319,8 @@ class FullyBufferedCursorFetchStrategy(CursorFetchStrategy):
|
|
|
1315
1319
|
if size is None:
|
|
1316
1320
|
return self.fetchall(result, dbapi_cursor)
|
|
1317
1321
|
|
|
1318
|
-
|
|
1319
|
-
rows =
|
|
1320
|
-
self._rowbuffer = collections.deque(buf[size:])
|
|
1322
|
+
rb = self._rowbuffer
|
|
1323
|
+
rows = [rb.popleft() for _ in range(min(size, len(rb)))]
|
|
1321
1324
|
if not rows:
|
|
1322
1325
|
result._soft_close()
|
|
1323
1326
|
return rows
|
sqlalchemy/engine/default.py
CHANGED
|
@@ -168,7 +168,10 @@ class DefaultDialect(Dialect):
|
|
|
168
168
|
tuple_in_values = False
|
|
169
169
|
|
|
170
170
|
connection_characteristics = util.immutabledict(
|
|
171
|
-
{
|
|
171
|
+
{
|
|
172
|
+
"isolation_level": characteristics.IsolationLevelCharacteristic(),
|
|
173
|
+
"logging_token": characteristics.LoggingTokenCharacteristic(),
|
|
174
|
+
}
|
|
172
175
|
)
|
|
173
176
|
|
|
174
177
|
engine_config_types: Mapping[str, Any] = util.immutabledict(
|
|
@@ -660,7 +663,7 @@ class DefaultDialect(Dialect):
|
|
|
660
663
|
if connection.in_transaction():
|
|
661
664
|
trans_objs = [
|
|
662
665
|
(name, obj)
|
|
663
|
-
for name, obj,
|
|
666
|
+
for name, obj, _ in characteristic_values
|
|
664
667
|
if obj.transactional
|
|
665
668
|
]
|
|
666
669
|
if trans_objs:
|
|
@@ -673,8 +676,10 @@ class DefaultDialect(Dialect):
|
|
|
673
676
|
)
|
|
674
677
|
|
|
675
678
|
dbapi_connection = connection.connection.dbapi_connection
|
|
676
|
-
for
|
|
677
|
-
characteristic.
|
|
679
|
+
for _, characteristic, value in characteristic_values:
|
|
680
|
+
characteristic.set_connection_characteristic(
|
|
681
|
+
self, connection, dbapi_connection, value
|
|
682
|
+
)
|
|
678
683
|
connection.connection._connection_record.finalize_callback.append(
|
|
679
684
|
functools.partial(self._reset_characteristics, characteristics)
|
|
680
685
|
)
|
sqlalchemy/event/api.py
CHANGED
|
@@ -132,7 +132,7 @@ def listens_for(
|
|
|
132
132
|
The :func:`.listens_for` decorator is part of the primary interface for the
|
|
133
133
|
SQLAlchemy event system, documented at :ref:`event_toplevel`.
|
|
134
134
|
|
|
135
|
-
This function generally shares the same kwargs as :func:`.
|
|
135
|
+
This function generally shares the same kwargs as :func:`.listen`.
|
|
136
136
|
|
|
137
137
|
e.g.::
|
|
138
138
|
|