SQLAlchemy 2.1.0__cp315-cp315t-win_amd64.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.
Files changed (276) hide show
  1. sqlalchemy/__init__.py +299 -0
  2. sqlalchemy/connectors/__init__.py +18 -0
  3. sqlalchemy/connectors/aioodbc.py +171 -0
  4. sqlalchemy/connectors/asyncio.py +476 -0
  5. sqlalchemy/connectors/pyodbc.py +248 -0
  6. sqlalchemy/dialects/__init__.py +62 -0
  7. sqlalchemy/dialects/_typing.py +29 -0
  8. sqlalchemy/dialects/mssql/__init__.py +88 -0
  9. sqlalchemy/dialects/mssql/aioodbc.py +63 -0
  10. sqlalchemy/dialects/mssql/base.py +4833 -0
  11. sqlalchemy/dialects/mssql/information_schema.py +345 -0
  12. sqlalchemy/dialects/mssql/json.py +140 -0
  13. sqlalchemy/dialects/mssql/mssqlpython.py +251 -0
  14. sqlalchemy/dialects/mssql/provision.py +196 -0
  15. sqlalchemy/dialects/mssql/pymssql.py +130 -0
  16. sqlalchemy/dialects/mssql/pyodbc.py +697 -0
  17. sqlalchemy/dialects/mysql/__init__.py +106 -0
  18. sqlalchemy/dialects/mysql/_mariadb_shim.py +312 -0
  19. sqlalchemy/dialects/mysql/aiomysql.py +260 -0
  20. sqlalchemy/dialects/mysql/asyncmy.py +241 -0
  21. sqlalchemy/dialects/mysql/base.py +3896 -0
  22. sqlalchemy/dialects/mysql/cymysql.py +107 -0
  23. sqlalchemy/dialects/mysql/dml.py +279 -0
  24. sqlalchemy/dialects/mysql/enumerated.py +277 -0
  25. sqlalchemy/dialects/mysql/expression.py +146 -0
  26. sqlalchemy/dialects/mysql/json.py +92 -0
  27. sqlalchemy/dialects/mysql/mariadb.py +67 -0
  28. sqlalchemy/dialects/mysql/mariadbconnector.py +314 -0
  29. sqlalchemy/dialects/mysql/mysqlconnector.py +291 -0
  30. sqlalchemy/dialects/mysql/mysqldb.py +318 -0
  31. sqlalchemy/dialects/mysql/provision.py +153 -0
  32. sqlalchemy/dialects/mysql/pymysql.py +188 -0
  33. sqlalchemy/dialects/mysql/pyodbc.py +157 -0
  34. sqlalchemy/dialects/mysql/reflection.py +724 -0
  35. sqlalchemy/dialects/mysql/reserved_words.py +570 -0
  36. sqlalchemy/dialects/mysql/types.py +845 -0
  37. sqlalchemy/dialects/oracle/__init__.py +85 -0
  38. sqlalchemy/dialects/oracle/base.py +3847 -0
  39. sqlalchemy/dialects/oracle/cx_oracle.py +1736 -0
  40. sqlalchemy/dialects/oracle/dictionary.py +507 -0
  41. sqlalchemy/dialects/oracle/json.py +157 -0
  42. sqlalchemy/dialects/oracle/oracledb.py +921 -0
  43. sqlalchemy/dialects/oracle/provision.py +288 -0
  44. sqlalchemy/dialects/oracle/types.py +367 -0
  45. sqlalchemy/dialects/oracle/vector.py +366 -0
  46. sqlalchemy/dialects/postgresql/__init__.py +170 -0
  47. sqlalchemy/dialects/postgresql/_psycopg_common.py +232 -0
  48. sqlalchemy/dialects/postgresql/array.py +534 -0
  49. sqlalchemy/dialects/postgresql/asyncpg.py +1318 -0
  50. sqlalchemy/dialects/postgresql/base.py +5977 -0
  51. sqlalchemy/dialects/postgresql/bitstring.py +327 -0
  52. sqlalchemy/dialects/postgresql/dml.py +360 -0
  53. sqlalchemy/dialects/postgresql/ext.py +599 -0
  54. sqlalchemy/dialects/postgresql/hstore.py +422 -0
  55. sqlalchemy/dialects/postgresql/json.py +411 -0
  56. sqlalchemy/dialects/postgresql/named_types.py +535 -0
  57. sqlalchemy/dialects/postgresql/operators.py +129 -0
  58. sqlalchemy/dialects/postgresql/pg8000.py +655 -0
  59. sqlalchemy/dialects/postgresql/pg_catalog.py +345 -0
  60. sqlalchemy/dialects/postgresql/provision.py +202 -0
  61. sqlalchemy/dialects/postgresql/psycopg.py +800 -0
  62. sqlalchemy/dialects/postgresql/psycopg2.py +860 -0
  63. sqlalchemy/dialects/postgresql/psycopg2cffi.py +62 -0
  64. sqlalchemy/dialects/postgresql/ranges.py +1002 -0
  65. sqlalchemy/dialects/postgresql/types.py +388 -0
  66. sqlalchemy/dialects/sqlite/__init__.py +59 -0
  67. sqlalchemy/dialects/sqlite/aiosqlite.py +375 -0
  68. sqlalchemy/dialects/sqlite/base.py +3156 -0
  69. sqlalchemy/dialects/sqlite/dml.py +314 -0
  70. sqlalchemy/dialects/sqlite/json.py +134 -0
  71. sqlalchemy/dialects/sqlite/provision.py +237 -0
  72. sqlalchemy/dialects/sqlite/pysqlcipher.py +166 -0
  73. sqlalchemy/dialects/sqlite/pysqlite.py +959 -0
  74. sqlalchemy/dialects/type_migration_guidelines.txt +145 -0
  75. sqlalchemy/engine/__init__.py +62 -0
  76. sqlalchemy/engine/_processors_cy.cp315t-win_amd64.pyd +0 -0
  77. sqlalchemy/engine/_processors_cy.py +92 -0
  78. sqlalchemy/engine/_result_cy.cp315t-win_amd64.pyd +0 -0
  79. sqlalchemy/engine/_result_cy.py +711 -0
  80. sqlalchemy/engine/_row_cy.cp315t-win_amd64.pyd +0 -0
  81. sqlalchemy/engine/_row_cy.py +232 -0
  82. sqlalchemy/engine/_util_cy.cp315t-win_amd64.pyd +0 -0
  83. sqlalchemy/engine/_util_cy.py +136 -0
  84. sqlalchemy/engine/base.py +3357 -0
  85. sqlalchemy/engine/characteristics.py +155 -0
  86. sqlalchemy/engine/create.py +877 -0
  87. sqlalchemy/engine/cursor.py +2425 -0
  88. sqlalchemy/engine/default.py +2627 -0
  89. sqlalchemy/engine/events.py +965 -0
  90. sqlalchemy/engine/interfaces.py +3647 -0
  91. sqlalchemy/engine/mock.py +133 -0
  92. sqlalchemy/engine/processors.py +83 -0
  93. sqlalchemy/engine/reflection.py +2141 -0
  94. sqlalchemy/engine/result.py +2012 -0
  95. sqlalchemy/engine/row.py +397 -0
  96. sqlalchemy/engine/strategies.py +16 -0
  97. sqlalchemy/engine/url.py +922 -0
  98. sqlalchemy/engine/util.py +164 -0
  99. sqlalchemy/event/__init__.py +26 -0
  100. sqlalchemy/event/api.py +220 -0
  101. sqlalchemy/event/attr.py +675 -0
  102. sqlalchemy/event/base.py +473 -0
  103. sqlalchemy/event/legacy.py +259 -0
  104. sqlalchemy/event/registry.py +391 -0
  105. sqlalchemy/events.py +17 -0
  106. sqlalchemy/exc.py +939 -0
  107. sqlalchemy/ext/__init__.py +10 -0
  108. sqlalchemy/ext/associationproxy.py +2073 -0
  109. sqlalchemy/ext/asyncio/__init__.py +29 -0
  110. sqlalchemy/ext/asyncio/base.py +281 -0
  111. sqlalchemy/ext/asyncio/engine.py +1489 -0
  112. sqlalchemy/ext/asyncio/exc.py +30 -0
  113. sqlalchemy/ext/asyncio/result.py +994 -0
  114. sqlalchemy/ext/asyncio/scoping.py +1787 -0
  115. sqlalchemy/ext/asyncio/session.py +2268 -0
  116. sqlalchemy/ext/automap.py +1702 -0
  117. sqlalchemy/ext/baked.py +558 -0
  118. sqlalchemy/ext/compiler.py +601 -0
  119. sqlalchemy/ext/declarative/__init__.py +65 -0
  120. sqlalchemy/ext/declarative/extensions.py +561 -0
  121. sqlalchemy/ext/horizontal_shard.py +481 -0
  122. sqlalchemy/ext/hybrid.py +1877 -0
  123. sqlalchemy/ext/indexable.py +364 -0
  124. sqlalchemy/ext/instrumentation.py +450 -0
  125. sqlalchemy/ext/mutable.py +1081 -0
  126. sqlalchemy/ext/orderinglist.py +440 -0
  127. sqlalchemy/ext/serializer.py +184 -0
  128. sqlalchemy/future/__init__.py +17 -0
  129. sqlalchemy/future/engine.py +15 -0
  130. sqlalchemy/inspection.py +188 -0
  131. sqlalchemy/log.py +279 -0
  132. sqlalchemy/orm/__init__.py +176 -0
  133. sqlalchemy/orm/_orm_constructors.py +2711 -0
  134. sqlalchemy/orm/_typing.py +180 -0
  135. sqlalchemy/orm/attributes.py +2868 -0
  136. sqlalchemy/orm/base.py +991 -0
  137. sqlalchemy/orm/bulk_persistence.py +2168 -0
  138. sqlalchemy/orm/clsregistry.py +630 -0
  139. sqlalchemy/orm/collections.py +1569 -0
  140. sqlalchemy/orm/context.py +3475 -0
  141. sqlalchemy/orm/decl_api.py +2335 -0
  142. sqlalchemy/orm/decl_base.py +2300 -0
  143. sqlalchemy/orm/dependency.py +1306 -0
  144. sqlalchemy/orm/descriptor_props.py +1205 -0
  145. sqlalchemy/orm/dynamic.py +306 -0
  146. sqlalchemy/orm/evaluator.py +378 -0
  147. sqlalchemy/orm/events.py +3387 -0
  148. sqlalchemy/orm/exc.py +237 -0
  149. sqlalchemy/orm/identity.py +302 -0
  150. sqlalchemy/orm/instrumentation.py +749 -0
  151. sqlalchemy/orm/interfaces.py +1595 -0
  152. sqlalchemy/orm/loading.py +1712 -0
  153. sqlalchemy/orm/mapped_collection.py +557 -0
  154. sqlalchemy/orm/mapper.py +4465 -0
  155. sqlalchemy/orm/path_registry.py +907 -0
  156. sqlalchemy/orm/persistence.py +1790 -0
  157. sqlalchemy/orm/properties.py +972 -0
  158. sqlalchemy/orm/query.py +3528 -0
  159. sqlalchemy/orm/relationships.py +3615 -0
  160. sqlalchemy/orm/scoping.py +2251 -0
  161. sqlalchemy/orm/session.py +5493 -0
  162. sqlalchemy/orm/state.py +1175 -0
  163. sqlalchemy/orm/state_changes.py +196 -0
  164. sqlalchemy/orm/strategies.py +3559 -0
  165. sqlalchemy/orm/strategy_options.py +2648 -0
  166. sqlalchemy/orm/sync.py +164 -0
  167. sqlalchemy/orm/unitofwork.py +797 -0
  168. sqlalchemy/orm/util.py +2550 -0
  169. sqlalchemy/orm/writeonly.py +701 -0
  170. sqlalchemy/pool/__init__.py +41 -0
  171. sqlalchemy/pool/base.py +1544 -0
  172. sqlalchemy/pool/events.py +375 -0
  173. sqlalchemy/pool/impl.py +583 -0
  174. sqlalchemy/py.typed +0 -0
  175. sqlalchemy/schema.py +75 -0
  176. sqlalchemy/sql/__init__.py +156 -0
  177. sqlalchemy/sql/_annotated_cols.py +402 -0
  178. sqlalchemy/sql/_cache_key_cy.cp315t-win_amd64.pyd +0 -0
  179. sqlalchemy/sql/_cache_key_cy.py +363 -0
  180. sqlalchemy/sql/_dml_constructors.py +132 -0
  181. sqlalchemy/sql/_elements_constructors.py +2190 -0
  182. sqlalchemy/sql/_orm_types.py +19 -0
  183. sqlalchemy/sql/_selectable_constructors.py +840 -0
  184. sqlalchemy/sql/_typing.py +500 -0
  185. sqlalchemy/sql/_util_cy.cp315t-win_amd64.pyd +0 -0
  186. sqlalchemy/sql/_util_cy.pxd +11 -0
  187. sqlalchemy/sql/_util_cy.py +127 -0
  188. sqlalchemy/sql/annotation.py +590 -0
  189. sqlalchemy/sql/base.py +2852 -0
  190. sqlalchemy/sql/cache_key.py +915 -0
  191. sqlalchemy/sql/coercions.py +1373 -0
  192. sqlalchemy/sql/compiler.py +8469 -0
  193. sqlalchemy/sql/crud.py +1816 -0
  194. sqlalchemy/sql/ddl.py +1962 -0
  195. sqlalchemy/sql/default_comparator.py +660 -0
  196. sqlalchemy/sql/dml.py +2018 -0
  197. sqlalchemy/sql/elements.py +6062 -0
  198. sqlalchemy/sql/events.py +458 -0
  199. sqlalchemy/sql/expression.py +171 -0
  200. sqlalchemy/sql/functions.py +2380 -0
  201. sqlalchemy/sql/lambdas.py +1442 -0
  202. sqlalchemy/sql/naming.py +204 -0
  203. sqlalchemy/sql/operators.py +2909 -0
  204. sqlalchemy/sql/roles.py +332 -0
  205. sqlalchemy/sql/schema.py +7080 -0
  206. sqlalchemy/sql/selectable.py +7644 -0
  207. sqlalchemy/sql/sqltypes.py +4130 -0
  208. sqlalchemy/sql/traversals.py +1041 -0
  209. sqlalchemy/sql/type_api.py +2450 -0
  210. sqlalchemy/sql/util.py +1496 -0
  211. sqlalchemy/sql/visitors.py +1153 -0
  212. sqlalchemy/testing/__init__.py +97 -0
  213. sqlalchemy/testing/assertions.py +1007 -0
  214. sqlalchemy/testing/assertsql.py +519 -0
  215. sqlalchemy/testing/asyncio.py +128 -0
  216. sqlalchemy/testing/cancellation.py +237 -0
  217. sqlalchemy/testing/config.py +440 -0
  218. sqlalchemy/testing/engines.py +496 -0
  219. sqlalchemy/testing/entities.py +117 -0
  220. sqlalchemy/testing/exclusions.py +501 -0
  221. sqlalchemy/testing/fixtures/__init__.py +30 -0
  222. sqlalchemy/testing/fixtures/base.py +426 -0
  223. sqlalchemy/testing/fixtures/mypy.py +247 -0
  224. sqlalchemy/testing/fixtures/orm.py +227 -0
  225. sqlalchemy/testing/fixtures/sql.py +538 -0
  226. sqlalchemy/testing/pickleable.py +155 -0
  227. sqlalchemy/testing/plugin/__init__.py +6 -0
  228. sqlalchemy/testing/plugin/bootstrap.py +50 -0
  229. sqlalchemy/testing/plugin/plugin_base.py +828 -0
  230. sqlalchemy/testing/plugin/pytestplugin.py +896 -0
  231. sqlalchemy/testing/profiles_file.py +350 -0
  232. sqlalchemy/testing/profiling.py +294 -0
  233. sqlalchemy/testing/provision.py +633 -0
  234. sqlalchemy/testing/requirements.py +1990 -0
  235. sqlalchemy/testing/schema.py +198 -0
  236. sqlalchemy/testing/suite/__init__.py +19 -0
  237. sqlalchemy/testing/suite/test_cte.py +237 -0
  238. sqlalchemy/testing/suite/test_ddl.py +420 -0
  239. sqlalchemy/testing/suite/test_dialect.py +777 -0
  240. sqlalchemy/testing/suite/test_insert.py +630 -0
  241. sqlalchemy/testing/suite/test_reflection.py +3815 -0
  242. sqlalchemy/testing/suite/test_results.py +660 -0
  243. sqlalchemy/testing/suite/test_rowcount.py +258 -0
  244. sqlalchemy/testing/suite/test_select.py +2112 -0
  245. sqlalchemy/testing/suite/test_sequence.py +317 -0
  246. sqlalchemy/testing/suite/test_table_via_select.py +686 -0
  247. sqlalchemy/testing/suite/test_types.py +2271 -0
  248. sqlalchemy/testing/suite/test_unicode_ddl.py +189 -0
  249. sqlalchemy/testing/suite/test_update_delete.py +176 -0
  250. sqlalchemy/testing/util.py +575 -0
  251. sqlalchemy/testing/warnings.py +52 -0
  252. sqlalchemy/types.py +75 -0
  253. sqlalchemy/util/__init__.py +165 -0
  254. sqlalchemy/util/_collections.py +688 -0
  255. sqlalchemy/util/_collections_cy.cp315t-win_amd64.pyd +0 -0
  256. sqlalchemy/util/_collections_cy.pxd +8 -0
  257. sqlalchemy/util/_collections_cy.py +516 -0
  258. sqlalchemy/util/_has_cython.py +48 -0
  259. sqlalchemy/util/_immutabledict_cy.cp315t-win_amd64.pyd +0 -0
  260. sqlalchemy/util/_immutabledict_cy.py +240 -0
  261. sqlalchemy/util/compat.py +298 -0
  262. sqlalchemy/util/concurrency.py +272 -0
  263. sqlalchemy/util/cython.py +95 -0
  264. sqlalchemy/util/deprecations.py +401 -0
  265. sqlalchemy/util/langhelpers.py +2803 -0
  266. sqlalchemy/util/preloaded.py +153 -0
  267. sqlalchemy/util/queue.py +304 -0
  268. sqlalchemy/util/tool_support.py +202 -0
  269. sqlalchemy/util/topological.py +120 -0
  270. sqlalchemy/util/typing.py +709 -0
  271. sqlalchemy-2.1.0.dist-info/METADATA +270 -0
  272. sqlalchemy-2.1.0.dist-info/RECORD +276 -0
  273. sqlalchemy-2.1.0.dist-info/WHEEL +5 -0
  274. sqlalchemy-2.1.0.dist-info/licenses/AUTHORS +30 -0
  275. sqlalchemy-2.1.0.dist-info/licenses/LICENSE +19 -0
  276. sqlalchemy-2.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1990 @@
1
+ # testing/requirements.py
2
+ # Copyright (C) 2005-2026 the SQLAlchemy authors and contributors
3
+ # <see AUTHORS file>
4
+ #
5
+ # This module is part of SQLAlchemy and is released under
6
+ # the MIT License: https://www.opensource.org/licenses/mit-license.php
7
+ # mypy: ignore-errors
8
+
9
+
10
+ """Global database feature support policy.
11
+
12
+ Provides decorators to mark tests requiring specific feature support from the
13
+ target database.
14
+
15
+ External dialect test suites should subclass SuiteRequirements
16
+ to provide specific inclusion/exclusions.
17
+
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ import os
23
+ import platform
24
+
25
+ from . import asyncio as _test_asyncio
26
+ from . import exclusions
27
+ from .exclusions import only_on
28
+ from .. import create_engine
29
+ from .. import util
30
+ from ..pool import QueuePool
31
+
32
+
33
+ class Requirements:
34
+ pass
35
+
36
+
37
+ class SuiteRequirements(Requirements):
38
+ @property
39
+ def create_table(self):
40
+ """target platform can emit basic CreateTable DDL."""
41
+
42
+ return exclusions.open()
43
+
44
+ @property
45
+ def drop_table(self):
46
+ """target platform can emit basic DropTable DDL."""
47
+
48
+ return exclusions.open()
49
+
50
+ @property
51
+ def create_table_as(self):
52
+ """target platform supports CREATE TABLE AS SELECT."""
53
+
54
+ return exclusions.closed()
55
+
56
+ @property
57
+ def create_temp_table_as(self):
58
+ """target platform supports CREATE TEMPORARY TABLE AS SELECT."""
59
+
60
+ return exclusions.closed()
61
+
62
+ @property
63
+ def table_ddl_if_exists(self):
64
+ """target platform supports IF NOT EXISTS / IF EXISTS for tables."""
65
+
66
+ return exclusions.closed()
67
+
68
+ @property
69
+ def index_ddl_if_exists(self):
70
+ """target platform supports IF NOT EXISTS / IF EXISTS for indexes."""
71
+
72
+ return exclusions.closed()
73
+
74
+ @property
75
+ def uuid_data_type(self):
76
+ """Return databases that support the UUID datatype."""
77
+
78
+ return exclusions.closed()
79
+
80
+ @property
81
+ def foreign_keys(self):
82
+ """Target database must support foreign keys."""
83
+
84
+ return exclusions.open()
85
+
86
+ @property
87
+ def foreign_keys_reflect_as_index(self):
88
+ """Target database creates an index that's reflected for
89
+ foreign keys."""
90
+
91
+ return exclusions.closed()
92
+
93
+ @property
94
+ def unique_index_reflect_as_unique_constraints(self):
95
+ """Target database reflects unique indexes as unique constrains."""
96
+
97
+ return exclusions.closed()
98
+
99
+ @property
100
+ def unique_constraints_reflect_as_index(self):
101
+ """Target database reflects unique constraints as indexes."""
102
+
103
+ return exclusions.closed()
104
+
105
+ @property
106
+ def table_value_constructor(self):
107
+ """Database / dialect supports a query like:
108
+
109
+ .. sourcecode:: sql
110
+
111
+ SELECT * FROM VALUES ( (c1, c2), (c1, c2), ...)
112
+ AS some_table(col1, col2)
113
+
114
+ SQLAlchemy generates this with the :func:`_sql.values` function.
115
+
116
+ """
117
+ return exclusions.closed()
118
+
119
+ @property
120
+ def standard_cursor_sql(self):
121
+ """Target database passes SQL-92 style statements to cursor.execute()
122
+ when a statement like select() or insert() is run.
123
+
124
+ A very small portion of dialect-level tests will ensure that certain
125
+ conditions are present in SQL strings, and these tests use very basic
126
+ SQL that will work on any SQL-like platform in order to assert results.
127
+
128
+ It's normally a given for any pep-249 DBAPI that a statement like
129
+ "SELECT id, name FROM table WHERE some_table.id=5" will work.
130
+ However, there are dialects that don't actually produce SQL Strings
131
+ and instead may work with symbolic objects instead, or dialects that
132
+ aren't working with SQL, so for those this requirement can be marked
133
+ as excluded.
134
+
135
+ """
136
+
137
+ return exclusions.open()
138
+
139
+ @property
140
+ def on_update_cascade(self):
141
+ """target database must support ON UPDATE..CASCADE behavior in
142
+ foreign keys."""
143
+
144
+ return exclusions.open()
145
+
146
+ @property
147
+ def non_updating_cascade(self):
148
+ """target database must *not* support ON UPDATE..CASCADE behavior in
149
+ foreign keys."""
150
+ return exclusions.closed()
151
+
152
+ @property
153
+ def deferrable_fks(self):
154
+ return exclusions.closed()
155
+
156
+ @property
157
+ def on_update_or_deferrable_fks(self):
158
+ # TODO: exclusions should be composable,
159
+ # somehow only_if([x, y]) isn't working here, negation/conjunctions
160
+ # getting confused.
161
+ return exclusions.only_if(
162
+ lambda: self.on_update_cascade.enabled
163
+ or self.deferrable_fks.enabled
164
+ )
165
+
166
+ @property
167
+ def queue_pool(self):
168
+ """target database is using QueuePool"""
169
+
170
+ def go(config):
171
+ return isinstance(config.db.pool, QueuePool)
172
+
173
+ return exclusions.only_if(go)
174
+
175
+ @property
176
+ def self_referential_foreign_keys(self):
177
+ """Target database must support self-referential foreign keys."""
178
+
179
+ return exclusions.open()
180
+
181
+ @property
182
+ def repeated_column_foreign_keys(self):
183
+ """Target database must support a FOREIGN KEY constraint which names
184
+ the same local column more than once, e.g.
185
+ ``FOREIGN KEY (a, a) REFERENCES r (b, c)``.
186
+
187
+ """
188
+
189
+ return exclusions.closed()
190
+
191
+ @property
192
+ def repeated_remote_col_foreign_keys(self):
193
+ """Target database must support a FOREIGN KEY constraint which names
194
+ the same *remote* column more than once, e.g.
195
+ ``FOREIGN KEY (a, b) REFERENCES r (c, c)``.
196
+
197
+ """
198
+
199
+ return exclusions.closed()
200
+
201
+ @property
202
+ def foreign_key_ddl(self):
203
+ """Target database must support the DDL phrases for FOREIGN KEY."""
204
+
205
+ return exclusions.open()
206
+
207
+ @property
208
+ def named_constraints(self):
209
+ """target database must support names for constraints."""
210
+
211
+ return exclusions.open()
212
+
213
+ @property
214
+ def implicitly_named_constraints(self):
215
+ """target database must apply names to unnamed constraints."""
216
+
217
+ return exclusions.open()
218
+
219
+ @property
220
+ def unusual_column_name_characters(self):
221
+ """target database allows column names that have unusual characters
222
+ in them, such as dots, spaces, slashes, or percent signs.
223
+
224
+ The column names are as always in such a case quoted, however the
225
+ DB still needs to support those characters in the name somehow.
226
+
227
+ """
228
+ return exclusions.open()
229
+
230
+ @property
231
+ def subqueries(self):
232
+ """Target database must support subqueries."""
233
+
234
+ return exclusions.open()
235
+
236
+ @property
237
+ def offset(self):
238
+ """target database can render OFFSET, or an equivalent, in a
239
+ SELECT.
240
+ """
241
+
242
+ return exclusions.open()
243
+
244
+ @property
245
+ def bound_limit_offset(self):
246
+ """target database can render LIMIT and/or OFFSET using a bound
247
+ parameter
248
+ """
249
+
250
+ return exclusions.open()
251
+
252
+ @property
253
+ def sql_expression_limit_offset(self):
254
+ """target database can render LIMIT and/or OFFSET with a complete
255
+ SQL expression, such as one that uses the addition operator.
256
+ parameter
257
+ """
258
+
259
+ return exclusions.open()
260
+
261
+ @property
262
+ def parens_in_union_contained_select_w_limit_offset(self):
263
+ """Target database must support parenthesized SELECT in UNION
264
+ when LIMIT/OFFSET is specifically present.
265
+
266
+ E.g. (SELECT ...) UNION (SELECT ..)
267
+
268
+ This is known to fail on SQLite.
269
+
270
+ """
271
+ return exclusions.open()
272
+
273
+ @property
274
+ def parens_in_union_contained_select_wo_limit_offset(self):
275
+ """Target database must support parenthesized SELECT in UNION
276
+ when OFFSET/LIMIT is specifically not present.
277
+
278
+ E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..)
279
+
280
+ This is known to fail on SQLite. It also fails on Oracle
281
+ because without LIMIT/OFFSET, there is currently no step that
282
+ creates an additional subquery.
283
+
284
+ """
285
+ return exclusions.open()
286
+
287
+ @property
288
+ def boolean_col_expressions(self):
289
+ """Target database must support boolean expressions as columns"""
290
+
291
+ return exclusions.closed()
292
+
293
+ @property
294
+ def nullable_booleans(self):
295
+ """Target database allows boolean columns to store NULL."""
296
+
297
+ return exclusions.open()
298
+
299
+ @property
300
+ def nullsordering(self):
301
+ """Target backends that support nulls ordering."""
302
+
303
+ return exclusions.closed()
304
+
305
+ @property
306
+ def standalone_binds(self):
307
+ """target database/driver supports bound parameters as column
308
+ expressions without being in the context of a typed column.
309
+ """
310
+ return exclusions.open()
311
+
312
+ @property
313
+ def standalone_null_binds_whereclause(self):
314
+ """target database/driver supports bound parameters with NULL in the
315
+ WHERE clause, in situations where it has to be typed.
316
+
317
+ """
318
+ return exclusions.open()
319
+
320
+ @property
321
+ def intersect(self):
322
+ """Target database must support INTERSECT or equivalent."""
323
+ return exclusions.closed()
324
+
325
+ @property
326
+ def except_(self):
327
+ """Target database must support EXCEPT or equivalent (i.e. MINUS)."""
328
+ return exclusions.closed()
329
+
330
+ @property
331
+ def window_functions(self):
332
+ """Target database must support window functions."""
333
+ return exclusions.closed()
334
+
335
+ @property
336
+ def window_range(self):
337
+ """Target backend supports RANGE in window functions with int frames"""
338
+ return exclusions.closed()
339
+
340
+ @property
341
+ def window_range_numeric(self):
342
+ """Target backend supports numeric values in RANGE"""
343
+ return exclusions.closed()
344
+
345
+ @property
346
+ def window_range_non_numeric(self):
347
+ """Target backend supports non-numeric values in RANGE"""
348
+ return exclusions.closed()
349
+
350
+ @property
351
+ def ctes(self):
352
+ """Target database supports CTEs"""
353
+
354
+ return exclusions.closed()
355
+
356
+ @property
357
+ def ctes_with_update_delete(self):
358
+ """target database supports CTES that ride on top of a normal UPDATE
359
+ or DELETE statement which refers to the CTE in a correlated subquery.
360
+
361
+ """
362
+
363
+ return exclusions.closed()
364
+
365
+ @property
366
+ def ctes_with_values(self):
367
+ """target database supports CTES that ride on top of a VALUES
368
+ clause."""
369
+
370
+ return exclusions.closed()
371
+
372
+ @property
373
+ def ctes_on_dml(self):
374
+ """target database supports CTES which consist of INSERT, UPDATE
375
+ or DELETE *within* the CTE, e.g. WITH x AS (UPDATE....)"""
376
+
377
+ return exclusions.closed()
378
+
379
+ @property
380
+ def autoincrement_insert(self):
381
+ """target platform generates new surrogate integer primary key values
382
+ when insert() is executed, excluding the pk column."""
383
+
384
+ return exclusions.open()
385
+
386
+ @property
387
+ def fetch_rows_post_commit(self):
388
+ """target platform will allow cursor.fetchone() to proceed after a
389
+ COMMIT.
390
+
391
+ Typically this refers to an INSERT statement with RETURNING which
392
+ is invoked within "autocommit". If the row can be returned
393
+ after the autocommit, then this rule can be open.
394
+
395
+ """
396
+
397
+ return exclusions.open()
398
+
399
+ @property
400
+ def group_by_complex_expression(self):
401
+ """target platform supports SQL expressions in GROUP BY
402
+
403
+ e.g.
404
+
405
+ SELECT x + y AS somelabel FROM table GROUP BY x + y
406
+
407
+ """
408
+
409
+ return exclusions.open()
410
+
411
+ @property
412
+ def sane_rowcount(self):
413
+ return exclusions.skip_if(
414
+ lambda config: not config.db.dialect.supports_sane_rowcount,
415
+ "driver doesn't support 'sane' rowcount",
416
+ )
417
+
418
+ @property
419
+ def sane_multi_rowcount(self):
420
+ return exclusions.fails_if(
421
+ lambda config: not config.db.dialect.supports_sane_multi_rowcount,
422
+ "driver %(driver)s %(doesnt_support)s 'sane' multi row count",
423
+ )
424
+
425
+ @property
426
+ def sane_rowcount_w_returning(self):
427
+ return exclusions.fails_if(
428
+ lambda config: not (
429
+ config.db.dialect.supports_sane_rowcount_returning
430
+ ),
431
+ "driver doesn't support 'sane' rowcount when returning is on",
432
+ )
433
+
434
+ @property
435
+ def empty_inserts(self):
436
+ """target platform supports INSERT with no values, i.e.
437
+ INSERT DEFAULT VALUES or equivalent."""
438
+
439
+ return exclusions.only_if(
440
+ lambda config: config.db.dialect.supports_empty_insert
441
+ or config.db.dialect.supports_default_values
442
+ or config.db.dialect.supports_default_metavalue,
443
+ "empty inserts not supported",
444
+ )
445
+
446
+ @property
447
+ def empty_inserts_executemany(self):
448
+ """target platform supports INSERT with no values, i.e.
449
+ INSERT DEFAULT VALUES or equivalent, within executemany()"""
450
+
451
+ return self.empty_inserts
452
+
453
+ @property
454
+ def insert_from_select(self):
455
+ """target platform supports INSERT from a SELECT."""
456
+
457
+ return exclusions.open()
458
+
459
+ @property
460
+ def delete_returning(self):
461
+ """target platform supports DELETE ... RETURNING."""
462
+
463
+ return exclusions.only_if(
464
+ lambda config: config.db.dialect.delete_returning,
465
+ "%(database)s %(does_support)s 'DELETE ... RETURNING'",
466
+ )
467
+
468
+ @property
469
+ def insert_returning(self):
470
+ """target platform supports INSERT ... RETURNING."""
471
+
472
+ return exclusions.only_if(
473
+ lambda config: config.db.dialect.insert_returning,
474
+ "%(database)s %(does_support)s 'INSERT ... RETURNING'",
475
+ )
476
+
477
+ @property
478
+ def update_returning(self):
479
+ """target platform supports UPDATE ... RETURNING."""
480
+
481
+ return exclusions.only_if(
482
+ lambda config: config.db.dialect.update_returning,
483
+ "%(database)s %(does_support)s 'UPDATE ... RETURNING'",
484
+ )
485
+
486
+ @property
487
+ def update_returning_dialect_not_supported(self):
488
+ """target database rejects UPDATE ... RETURNING when the dialect
489
+ reports that ``update_returning`` is not supported.
490
+
491
+ This is normally the case; it's false only where a server has
492
+ gained UPDATE ... RETURNING that the dialect doesn't implement
493
+ yet, so that the statement runs rather than raising.
494
+
495
+ """
496
+
497
+ return exclusions.open()
498
+
499
+ @property
500
+ def insert_executemany_returning(self):
501
+ """target platform supports RETURNING when INSERT is used with
502
+ executemany(), e.g. multiple parameter sets, indicating
503
+ as many rows come back as do parameter sets were passed.
504
+
505
+ """
506
+
507
+ return exclusions.only_if(
508
+ lambda config: config.db.dialect.insert_executemany_returning,
509
+ "%(database)s %(does_support)s 'RETURNING of "
510
+ "multiple rows with INSERT executemany'",
511
+ )
512
+
513
+ @property
514
+ def insertmanyvalues(self):
515
+ return exclusions.only_if(
516
+ lambda config: config.db.dialect.supports_multivalues_insert
517
+ and config.db.dialect.insert_returning
518
+ and config.db.dialect.use_insertmanyvalues,
519
+ "%(database)s %(does_support)s 'insertmanyvalues functionality",
520
+ )
521
+
522
+ @property
523
+ def tuple_in(self):
524
+ """Target platform supports the syntax
525
+ "(x, y) IN ((x1, y1), (x2, y2), ...)"
526
+ """
527
+
528
+ return exclusions.closed()
529
+
530
+ @property
531
+ def tuple_in_w_empty(self):
532
+ """Target platform tuple IN w/ empty set"""
533
+ return self.tuple_in
534
+
535
+ @property
536
+ def duplicate_names_in_cursor_description(self):
537
+ """target platform supports a SELECT statement that has
538
+ the same name repeated more than once in the columns list."""
539
+
540
+ return exclusions.open()
541
+
542
+ @property
543
+ def denormalized_names(self):
544
+ """Target database must have 'denormalized', i.e.
545
+ UPPERCASE as case insensitive names."""
546
+
547
+ return exclusions.skip_if(
548
+ lambda config: not config.db.dialect.requires_name_normalize,
549
+ "Backend does not require denormalized names.",
550
+ )
551
+
552
+ @property
553
+ def multivalues_inserts(self):
554
+ """target database must support multiple VALUES clauses in an
555
+ INSERT statement."""
556
+
557
+ return exclusions.skip_if(
558
+ lambda config: not config.db.dialect.supports_multivalues_insert,
559
+ "Backend does not support multirow inserts.",
560
+ )
561
+
562
+ @property
563
+ def implements_get_lastrowid(self):
564
+ """target dialect implements the executioncontext.get_lastrowid()
565
+ method without reliance on RETURNING.
566
+
567
+ """
568
+ return exclusions.open()
569
+
570
+ @property
571
+ def arraysize(self):
572
+ """dialect includes the required pep-249 attribute
573
+ ``cursor.arraysize``"""
574
+
575
+ return exclusions.open()
576
+
577
+ @property
578
+ def emulated_lastrowid(self):
579
+ """target dialect retrieves cursor.lastrowid, or fetches
580
+ from a database-side function after an insert() construct executes,
581
+ within the get_lastrowid() method.
582
+
583
+ Only dialects that "pre-execute", or need RETURNING to get last
584
+ inserted id, would return closed/fail/skip for this.
585
+
586
+ """
587
+ return exclusions.closed()
588
+
589
+ @property
590
+ def emulated_lastrowid_even_with_sequences(self):
591
+ """target dialect retrieves cursor.lastrowid or an equivalent
592
+ after an insert() construct executes, even if the table has a
593
+ Sequence on it.
594
+
595
+ """
596
+ return exclusions.closed()
597
+
598
+ @property
599
+ def dbapi_lastrowid(self):
600
+ """target platform includes a 'lastrowid' accessor on the DBAPI
601
+ cursor object.
602
+
603
+ """
604
+ return exclusions.closed()
605
+
606
+ @property
607
+ def views(self):
608
+ """Target database must support VIEWs."""
609
+
610
+ return exclusions.closed()
611
+
612
+ @property
613
+ def schemas(self):
614
+ """Target database must support external schemas, and have one
615
+ named 'test_schema'."""
616
+
617
+ return only_on(lambda config: config.db.dialect.supports_schemas)
618
+
619
+ @property
620
+ def cross_schema_fk_reflection(self):
621
+ """target system must support reflection of inter-schema
622
+ foreign keys"""
623
+ return exclusions.closed()
624
+
625
+ @property
626
+ def foreign_key_constraint_name_reflection(self):
627
+ """Target supports reflection of FOREIGN KEY constraints and
628
+ will return the name of the constraint that was used in the
629
+ "CONSTRAINT <name> FOREIGN KEY" DDL.
630
+
631
+ MySQL prior to version 8 and MariaDB prior to version 10.5
632
+ don't support this.
633
+
634
+ """
635
+ return exclusions.closed()
636
+
637
+ @property
638
+ def implicit_default_schema(self):
639
+ """target system has a strong concept of 'default' schema that can
640
+ be referred to implicitly.
641
+
642
+ basically, PostgreSQL.
643
+
644
+ """
645
+ return exclusions.closed()
646
+
647
+ @property
648
+ def default_schema_name_switch(self):
649
+ """target dialect implements provisioning module including
650
+ set_default_schema_on_connection"""
651
+
652
+ return exclusions.closed()
653
+
654
+ @property
655
+ def server_side_cursors(self):
656
+ """Target dialect must support server side cursors."""
657
+
658
+ return exclusions.only_if(
659
+ [lambda config: config.db.dialect.supports_server_side_cursors],
660
+ "no server side cursors support",
661
+ )
662
+
663
+ @property
664
+ def sequences(self):
665
+ """Target database must support SEQUENCEs."""
666
+
667
+ return exclusions.only_if(
668
+ [lambda config: config.db.dialect.supports_sequences],
669
+ "no sequence support",
670
+ )
671
+
672
+ @property
673
+ def no_sequences(self):
674
+ """the opposite of "sequences", DB does not support sequences at
675
+ all."""
676
+
677
+ return exclusions.NotPredicate(self.sequences)
678
+
679
+ @property
680
+ def sequences_optional(self):
681
+ """Target database supports sequences, but also optionally
682
+ as a means of generating new PK values."""
683
+
684
+ return exclusions.only_if(
685
+ [
686
+ lambda config: config.db.dialect.supports_sequences
687
+ and config.db.dialect.sequences_optional
688
+ ],
689
+ "no sequence support, or sequences not optional",
690
+ )
691
+
692
+ @property
693
+ def supports_lastrowid(self):
694
+ """target database / driver supports cursor.lastrowid as a means
695
+ of retrieving the last inserted primary key value.
696
+
697
+ note that if the target DB supports sequences also, this is still
698
+ assumed to work. This is a new use case brought on by MariaDB 10.3.
699
+
700
+ """
701
+ return exclusions.only_if(
702
+ [lambda config: config.db.dialect.postfetch_lastrowid]
703
+ )
704
+
705
+ @property
706
+ def no_lastrowid_support(self):
707
+ """the opposite of supports_lastrowid"""
708
+ return exclusions.only_if(
709
+ [lambda config: not config.db.dialect.postfetch_lastrowid]
710
+ )
711
+
712
+ @property
713
+ def reflects_pk_names(self):
714
+ return exclusions.closed()
715
+
716
+ @property
717
+ def table_reflection(self):
718
+ """target database has general support for table reflection"""
719
+ return exclusions.open()
720
+
721
+ @property
722
+ def reflect_tables_no_columns(self):
723
+ """target database supports creation and reflection of tables with no
724
+ columns, or at least tables that seem to have no columns."""
725
+
726
+ return exclusions.closed()
727
+
728
+ @property
729
+ def temp_table_comment_reflection(self):
730
+ """indicates if database supports comments on temp tables and
731
+ the dialect can reflect them"""
732
+ return exclusions.closed()
733
+
734
+ @property
735
+ def comment_reflection(self):
736
+ """Indicates if the database support table comment reflection"""
737
+ return exclusions.closed()
738
+
739
+ @property
740
+ def comment_reflection_full_unicode(self):
741
+ """Indicates if the database support table comment reflection in the
742
+ full unicode range, including emoji etc.
743
+ """
744
+ return exclusions.closed()
745
+
746
+ @property
747
+ def constraint_comment_reflection(self):
748
+ """indicates if the database support comments on constraints
749
+ and their reflection"""
750
+ return exclusions.closed()
751
+
752
+ @property
753
+ def column_collation_reflection(self):
754
+ """Indicates if the database support column collation reflection.
755
+
756
+ This requirement also uses ``get_order_by_collation`` to get
757
+ an available collation.
758
+ """
759
+ return exclusions.closed()
760
+
761
+ @property
762
+ def view_column_reflection(self):
763
+ """target database must support retrieval of the columns in a view,
764
+ similarly to how a table is inspected.
765
+
766
+ This does not include the full CREATE VIEW definition.
767
+
768
+ """
769
+ return self.views
770
+
771
+ @property
772
+ def view_reflection(self):
773
+ """target database must support inspection of the full CREATE VIEW
774
+ definition."""
775
+ return self.views
776
+
777
+ @property
778
+ def schema_reflection(self):
779
+ return self.schemas
780
+
781
+ @property
782
+ def schema_create_delete(self):
783
+ """target database supports schema create and dropped with
784
+ 'CREATE SCHEMA' and 'DROP SCHEMA'"""
785
+ return exclusions.closed()
786
+
787
+ @property
788
+ def primary_key_constraint_reflection(self):
789
+ return exclusions.open()
790
+
791
+ @property
792
+ def foreign_key_constraint_reflection(self):
793
+ return exclusions.open()
794
+
795
+ @property
796
+ def foreign_key_constraint_option_reflection_ondelete(self):
797
+ return exclusions.closed()
798
+
799
+ @property
800
+ def fk_constraint_option_reflection_ondelete_restrict(self):
801
+ return exclusions.closed()
802
+
803
+ @property
804
+ def fk_constraint_option_reflection_ondelete_noaction(self):
805
+ return exclusions.closed()
806
+
807
+ @property
808
+ def foreign_key_constraint_option_reflection_onupdate(self):
809
+ return exclusions.closed()
810
+
811
+ @property
812
+ def fk_constraint_option_reflection_onupdate_restrict(self):
813
+ return exclusions.closed()
814
+
815
+ @property
816
+ def temp_table_reflection(self):
817
+ return exclusions.open()
818
+
819
+ @property
820
+ def temp_table_reflect_indexes(self):
821
+ return self.temp_table_reflection
822
+
823
+ @property
824
+ def temp_table_names(self):
825
+ """target dialect supports listing of temporary table names"""
826
+ return exclusions.closed()
827
+
828
+ @property
829
+ def has_temp_table(self):
830
+ """target dialect supports checking a single temp table name"""
831
+ return exclusions.closed()
832
+
833
+ @property
834
+ def temporary_tables(self):
835
+ """target database supports temporary tables"""
836
+ return exclusions.open()
837
+
838
+ @property
839
+ def temporary_views(self):
840
+ """target database supports temporary views"""
841
+ return exclusions.closed()
842
+
843
+ @property
844
+ def create_or_replace_view(self):
845
+ """target database supports CREATE OR REPLACE VIEW"""
846
+ return exclusions.closed()
847
+
848
+ @property
849
+ def index_reflection(self):
850
+ return exclusions.open()
851
+
852
+ @property
853
+ def index_reflects_included_columns(self):
854
+ return exclusions.closed()
855
+
856
+ @property
857
+ def indexes_with_ascdesc(self):
858
+ """target database supports CREATE INDEX with per-column ASC/DESC."""
859
+ return exclusions.open()
860
+
861
+ @property
862
+ def reflect_indexes_with_ascdesc(self):
863
+ """target database supports reflecting INDEX with per-column
864
+ ASC/DESC."""
865
+ return exclusions.open()
866
+
867
+ @property
868
+ def reflect_indexes_with_ascdesc_as_expression(self):
869
+ """target database supports reflecting INDEX with per-column
870
+ ASC/DESC but reflects them as expressions (like oracle)."""
871
+ return exclusions.closed()
872
+
873
+ @property
874
+ def indexes_check_column_order(self):
875
+ """target database supports CREATE INDEX with column order check."""
876
+ return exclusions.closed()
877
+
878
+ @property
879
+ def indexes_with_expressions(self):
880
+ """target database supports CREATE INDEX against SQL expressions."""
881
+ return exclusions.closed()
882
+
883
+ @property
884
+ def reflect_indexes_with_expressions(self):
885
+ """target database supports reflection of indexes with
886
+ SQL expressions."""
887
+ return exclusions.closed()
888
+
889
+ @property
890
+ def unique_constraint_reflection(self):
891
+ """target dialect supports reflection of unique constraints"""
892
+ return exclusions.open()
893
+
894
+ @property
895
+ def inline_check_constraint_reflection(self):
896
+ """target dialect supports reflection of inline check constraints"""
897
+ return exclusions.closed()
898
+
899
+ @property
900
+ def check_constraint_reflection(self):
901
+ """target dialect supports reflection of check constraints"""
902
+ return exclusions.closed()
903
+
904
+ @property
905
+ def duplicate_key_raises_integrity_error(self):
906
+ """target dialect raises IntegrityError when reporting an INSERT
907
+ with a primary key violation. (hint: it should)
908
+
909
+ """
910
+ return exclusions.open()
911
+
912
+ @property
913
+ def unbounded_varchar(self):
914
+ """Target database must support VARCHAR with no length"""
915
+
916
+ return exclusions.open()
917
+
918
+ @property
919
+ def nvarchar_types(self):
920
+ """target database supports NVARCHAR and NCHAR as an actual datatype"""
921
+ return exclusions.closed()
922
+
923
+ @property
924
+ def unicode_data_no_special_types(self):
925
+ """Target database/dialect can receive / deliver / compare data with
926
+ non-ASCII characters in plain VARCHAR, TEXT columns, without the need
927
+ for special "national" datatypes like NVARCHAR or similar.
928
+
929
+ """
930
+ return exclusions.open()
931
+
932
+ @property
933
+ def unicode_data(self):
934
+ """Target database/dialect must support Python unicode objects with
935
+ non-ASCII characters represented, delivered as bound parameters
936
+ as well as in result rows.
937
+
938
+ """
939
+ return exclusions.open()
940
+
941
+ @property
942
+ def unicode_ddl(self):
943
+ """Target driver must support some degree of non-ascii symbol
944
+ names.
945
+ """
946
+ return exclusions.closed()
947
+
948
+ @property
949
+ def symbol_names_w_double_quote(self):
950
+ """Target driver can create tables with a name like 'some " table'"""
951
+ return exclusions.open()
952
+
953
+ @property
954
+ def datetime_interval(self):
955
+ """target dialect supports rendering of a datetime.timedelta as a
956
+ literal string, e.g. via the TypeEngine.literal_processor() method.
957
+
958
+ """
959
+ return exclusions.closed()
960
+
961
+ @property
962
+ def datetime_literals(self):
963
+ """target dialect supports rendering of a date, time, or datetime as a
964
+ literal string, e.g. via the TypeEngine.literal_processor() method.
965
+
966
+ """
967
+
968
+ return exclusions.closed()
969
+
970
+ @property
971
+ def datetime(self):
972
+ """target dialect supports representation of Python
973
+ datetime.datetime() objects."""
974
+
975
+ return exclusions.open()
976
+
977
+ @property
978
+ def datetime_timezone(self):
979
+ """target dialect supports representation of Python
980
+ datetime.datetime() with tzinfo with DateTime(timezone=True)."""
981
+
982
+ return exclusions.closed()
983
+
984
+ @property
985
+ def time_timezone(self):
986
+ """target dialect supports representation of Python
987
+ datetime.time() with tzinfo with Time(timezone=True)."""
988
+
989
+ return exclusions.closed()
990
+
991
+ @property
992
+ def date_implicit_bound(self):
993
+ """target dialect when given a date object will bind it such
994
+ that the database server knows the object is a date, and not
995
+ a plain string.
996
+
997
+ """
998
+ return exclusions.open()
999
+
1000
+ @property
1001
+ def time_implicit_bound(self):
1002
+ """target dialect when given a time object will bind it such
1003
+ that the database server knows the object is a time, and not
1004
+ a plain string.
1005
+
1006
+ """
1007
+ return exclusions.open()
1008
+
1009
+ @property
1010
+ def datetime_implicit_bound(self):
1011
+ """target dialect when given a datetime object will bind it such
1012
+ that the database server knows the object is a datetime, and not
1013
+ a plain string.
1014
+
1015
+ """
1016
+ return exclusions.open()
1017
+
1018
+ @property
1019
+ def datetime_microseconds(self):
1020
+ """target dialect supports representation of Python
1021
+ datetime.datetime() with microsecond objects."""
1022
+
1023
+ return exclusions.open()
1024
+
1025
+ @property
1026
+ def timestamp_microseconds(self):
1027
+ """target dialect supports representation of Python
1028
+ datetime.datetime() with microsecond objects but only
1029
+ if TIMESTAMP is used."""
1030
+ return exclusions.closed()
1031
+
1032
+ @property
1033
+ def timestamp_microseconds_implicit_bound(self):
1034
+ """target dialect when given a datetime object which also includes
1035
+ a microseconds portion when using the TIMESTAMP data type
1036
+ will bind it such that the database server knows
1037
+ the object is a datetime with microseconds, and not a plain string.
1038
+
1039
+ """
1040
+ return self.timestamp_microseconds
1041
+
1042
+ @property
1043
+ def datetime_historic(self):
1044
+ """target dialect supports representation of Python
1045
+ datetime.datetime() objects with historic (pre 1970) values."""
1046
+
1047
+ return exclusions.closed()
1048
+
1049
+ @property
1050
+ def date(self):
1051
+ """target dialect supports representation of Python
1052
+ datetime.date() objects."""
1053
+
1054
+ return exclusions.open()
1055
+
1056
+ @property
1057
+ def date_coerces_from_datetime(self):
1058
+ """target dialect accepts a datetime object as the target
1059
+ of a date column."""
1060
+
1061
+ return exclusions.open()
1062
+
1063
+ @property
1064
+ def date_historic(self):
1065
+ """target dialect supports representation of Python
1066
+ datetime.datetime() objects with historic (pre 1970) values."""
1067
+
1068
+ return exclusions.closed()
1069
+
1070
+ @property
1071
+ def time(self):
1072
+ """target dialect supports representation of Python
1073
+ datetime.time() objects."""
1074
+
1075
+ return exclusions.open()
1076
+
1077
+ @property
1078
+ def time_microseconds(self):
1079
+ """target dialect supports representation of Python
1080
+ datetime.time() with microsecond objects."""
1081
+
1082
+ return exclusions.open()
1083
+
1084
+ @property
1085
+ def binary_comparisons(self):
1086
+ """target database/driver can allow BLOB/BINARY fields to be compared
1087
+ against a bound parameter value.
1088
+ """
1089
+
1090
+ return exclusions.open()
1091
+
1092
+ @property
1093
+ def binary_literals(self):
1094
+ """target backend supports simple binary literals, e.g. an
1095
+ expression like:
1096
+
1097
+ .. sourcecode:: sql
1098
+
1099
+ SELECT CAST('foo' AS BINARY)
1100
+
1101
+ Where ``BINARY`` is the type emitted from :class:`.LargeBinary`,
1102
+ e.g. it could be ``BLOB`` or similar.
1103
+
1104
+ Basically fails on Oracle.
1105
+
1106
+ """
1107
+
1108
+ return exclusions.open()
1109
+
1110
+ @property
1111
+ def autocommit(self):
1112
+ """target dialect supports 'AUTOCOMMIT' as an isolation_level"""
1113
+ return exclusions.closed()
1114
+
1115
+ @property
1116
+ def skip_autocommit_rollback(self):
1117
+ """target dialect supports the detect_autocommit_setting() method and
1118
+ uses the default implementation of do_rollback()"""
1119
+
1120
+ return exclusions.closed()
1121
+
1122
+ @property
1123
+ def isolation_level(self):
1124
+ """target dialect supports general isolation level settings.
1125
+
1126
+ Note that this requirement, when enabled, also requires that
1127
+ the get_isolation_levels() method be implemented.
1128
+
1129
+ """
1130
+ return exclusions.closed()
1131
+
1132
+ def get_isolation_levels(self, config):
1133
+ """Return a structure of supported isolation levels for the current
1134
+ testing dialect.
1135
+
1136
+ The structure indicates to the testing suite what the expected
1137
+ "default" isolation should be, as well as the other values that
1138
+ are accepted. The dictionary has two keys, "default" and "supported".
1139
+ The "supported" key refers to a list of all supported levels and
1140
+ it should include AUTOCOMMIT if the dialect supports it.
1141
+
1142
+ If the :meth:`.DefaultRequirements.isolation_level` requirement is
1143
+ not open, then this method has no return value.
1144
+
1145
+ E.g.::
1146
+
1147
+ >>> testing.requirements.get_isolation_levels()
1148
+ {
1149
+ "default": "READ_COMMITTED",
1150
+ "supported": [
1151
+ "SERIALIZABLE", "READ UNCOMMITTED",
1152
+ "READ COMMITTED", "REPEATABLE READ",
1153
+ "AUTOCOMMIT"
1154
+ ]
1155
+ }
1156
+ """
1157
+ with config.db.connect() as conn:
1158
+ try:
1159
+ supported = conn.dialect.get_isolation_level_values(
1160
+ conn.connection.dbapi_connection
1161
+ )
1162
+ except NotImplementedError:
1163
+ return None
1164
+ else:
1165
+ return {
1166
+ "default": conn.dialect.default_isolation_level,
1167
+ "supported": supported,
1168
+ }
1169
+
1170
+ @property
1171
+ def get_isolation_level_values(self):
1172
+ """target dialect supports the
1173
+ :meth:`_engine.Dialect.get_isolation_level_values`
1174
+ method added in SQLAlchemy 2.0.
1175
+
1176
+ """
1177
+
1178
+ def go(config):
1179
+ with config.db.connect() as conn:
1180
+ try:
1181
+ conn.dialect.get_isolation_level_values(
1182
+ conn.connection.dbapi_connection
1183
+ )
1184
+ except NotImplementedError:
1185
+ return False
1186
+ else:
1187
+ return True
1188
+
1189
+ return exclusions.only_if(go)
1190
+
1191
+ @property
1192
+ def dialect_level_isolation_level_param(self):
1193
+ """test that the dialect allows the 'isolation_level' argument
1194
+ to be handled by DefaultDialect"""
1195
+
1196
+ def go(config):
1197
+ try:
1198
+ e = create_engine(
1199
+ config.db.url, isolation_level="READ COMMITTED"
1200
+ )
1201
+ except:
1202
+ return False
1203
+ else:
1204
+ return (
1205
+ e.dialect._on_connect_isolation_level == "READ COMMITTED"
1206
+ )
1207
+
1208
+ return exclusions.only_if(go)
1209
+
1210
+ @property
1211
+ def array_type(self):
1212
+ """Target platform implements a native ARRAY type"""
1213
+ return exclusions.closed()
1214
+
1215
+ @property
1216
+ def json_type(self):
1217
+ """target platform implements a native JSON type."""
1218
+
1219
+ return exclusions.closed()
1220
+
1221
+ @property
1222
+ def json_array_indexes(self):
1223
+ """target platform supports numeric array indexes
1224
+ within a JSON structure"""
1225
+
1226
+ return self.json_type
1227
+
1228
+ @property
1229
+ def json_index_supplementary_unicode_element(self):
1230
+ return exclusions.open()
1231
+
1232
+ @property
1233
+ def legacy_unconditional_json_extract(self):
1234
+ """Backend has a JSON_EXTRACT or similar function that returns a
1235
+ valid JSON string in all cases.
1236
+
1237
+ Used to test a legacy feature and is not needed.
1238
+
1239
+ """
1240
+ return exclusions.closed()
1241
+
1242
+ @property
1243
+ def precision_numerics_general(self):
1244
+ """target backend has general support for moderately high-precision
1245
+ numerics."""
1246
+ return exclusions.open()
1247
+
1248
+ @property
1249
+ def precision_numerics_enotation_small(self):
1250
+ """target backend supports Decimal() objects using E notation
1251
+ to represent very small values."""
1252
+ return exclusions.closed()
1253
+
1254
+ @property
1255
+ def precision_numerics_enotation_large(self):
1256
+ """target backend supports Decimal() objects using E notation
1257
+ to represent very large values."""
1258
+ return exclusions.open()
1259
+
1260
+ @property
1261
+ def precision_numerics_many_significant_digits(self):
1262
+ """target backend supports values with many digits on both sides,
1263
+ such as 319438950232418390.273596, 87673.594069654243
1264
+
1265
+ """
1266
+ return exclusions.closed()
1267
+
1268
+ @property
1269
+ def cast_precision_numerics_many_significant_digits(self):
1270
+ """same as precision_numerics_many_significant_digits but within the
1271
+ context of a CAST statement (hello MySQL)
1272
+
1273
+ """
1274
+ return self.precision_numerics_many_significant_digits
1275
+
1276
+ @property
1277
+ def server_defaults(self):
1278
+ """Target backend supports server side defaults for columns"""
1279
+
1280
+ return exclusions.closed()
1281
+
1282
+ @property
1283
+ def expression_server_defaults(self):
1284
+ """Target backend supports server side defaults with SQL expressions
1285
+ for columns"""
1286
+
1287
+ return exclusions.closed()
1288
+
1289
+ @property
1290
+ def implicit_decimal_binds(self):
1291
+ """target backend will return a selected Decimal as a Decimal, not
1292
+ a string.
1293
+
1294
+ e.g.::
1295
+
1296
+ expr = decimal.Decimal("15.7563")
1297
+
1298
+ value = e.scalar(select(literal(expr)))
1299
+
1300
+ assert value == expr
1301
+
1302
+ See :ticket:`4036`
1303
+
1304
+ """
1305
+
1306
+ return exclusions.open()
1307
+
1308
+ @property
1309
+ def numeric_received_as_decimal_untyped(self):
1310
+ """target backend will return result columns that are explicitly
1311
+ against NUMERIC or similar precision-numeric datatypes (not including
1312
+ FLOAT or INT types) as Python Decimal objects, and not as floats
1313
+ or ints, including when no SQLAlchemy-side typing information is
1314
+ associated with the statement (e.g. such as a raw SQL string).
1315
+
1316
+ This should be enabled if either the DBAPI itself returns Decimal
1317
+ objects, or if the dialect has set up DBAPI-specific return type
1318
+ handlers such that Decimal objects come back automatically.
1319
+
1320
+ """
1321
+ return exclusions.open()
1322
+
1323
+ @property
1324
+ def nested_aggregates(self):
1325
+ """target database can select an aggregate from a subquery that's
1326
+ also using an aggregate
1327
+
1328
+ """
1329
+ return exclusions.open()
1330
+
1331
+ @property
1332
+ def aggregate_order_by(self):
1333
+ """target database can use ORDER BY or equivalent in an aggregate
1334
+ function, and dialect supports aggregate_order_by().
1335
+
1336
+ """
1337
+ return exclusions.closed()
1338
+
1339
+ @property
1340
+ def recursive_fk_cascade(self):
1341
+ """target database must support ON DELETE CASCADE on a self-referential
1342
+ foreign key
1343
+
1344
+ """
1345
+ return exclusions.open()
1346
+
1347
+ @property
1348
+ def precision_numerics_retains_significant_digits(self):
1349
+ """A precision numeric type will return empty significant digits,
1350
+ i.e. a value such as 10.000 will come back in Decimal form with
1351
+ the .000 maintained."""
1352
+
1353
+ return exclusions.closed()
1354
+
1355
+ @property
1356
+ def infinity_floats(self):
1357
+ """The Float type can persist and load float('inf'), float('-inf')."""
1358
+
1359
+ return exclusions.closed()
1360
+
1361
+ @property
1362
+ def float_or_double_precision_behaves_generically(self):
1363
+ return exclusions.closed()
1364
+
1365
+ @property
1366
+ def precision_generic_float_type(self):
1367
+ """target backend will return native floating point numbers with at
1368
+ least seven decimal places when using the generic Float type.
1369
+
1370
+ """
1371
+ return exclusions.open()
1372
+
1373
+ @property
1374
+ def literal_float_coercion(self):
1375
+ """target backend will return the exact float value 15.7563
1376
+ with only four significant digits from this statement:
1377
+
1378
+ SELECT :param
1379
+
1380
+ where :param is the Python float 15.7563
1381
+
1382
+ i.e. it does not return 15.75629997253418
1383
+
1384
+ """
1385
+ return exclusions.open()
1386
+
1387
+ @property
1388
+ def floats_to_four_decimals(self):
1389
+ """target backend can return a floating-point number with four
1390
+ significant digits (such as 15.7563) accurately
1391
+ (i.e. without FP inaccuracies, such as 15.75629997253418).
1392
+
1393
+ """
1394
+ return exclusions.open()
1395
+
1396
+ @property
1397
+ def fetch_null_from_numeric(self):
1398
+ """target backend doesn't crash when you try to select a NUMERIC
1399
+ value that has a value of NULL.
1400
+
1401
+ Added to support Pyodbc bug #351.
1402
+ """
1403
+
1404
+ return exclusions.open()
1405
+
1406
+ @property
1407
+ def float_is_numeric(self):
1408
+ """target backend uses Numeric for Float/Dual"""
1409
+
1410
+ return exclusions.open()
1411
+
1412
+ @property
1413
+ def text_type(self):
1414
+ """Target database must support an unbounded Text() "
1415
+ "type such as TEXT or CLOB"""
1416
+
1417
+ return exclusions.open()
1418
+
1419
+ @property
1420
+ def empty_strings_varchar(self):
1421
+ """target database can persist/return an empty string with a
1422
+ varchar.
1423
+
1424
+ """
1425
+ return exclusions.open()
1426
+
1427
+ @property
1428
+ def empty_strings_text(self):
1429
+ """target database can persist/return an empty string with an
1430
+ unbounded text."""
1431
+
1432
+ return exclusions.open()
1433
+
1434
+ @property
1435
+ def expressions_against_unbounded_text(self):
1436
+ """target database supports use of an unbounded textual field in a
1437
+ WHERE clause."""
1438
+
1439
+ return exclusions.open()
1440
+
1441
+ @property
1442
+ def selectone(self):
1443
+ """target driver must support the literal statement 'select 1'"""
1444
+ return exclusions.open()
1445
+
1446
+ @property
1447
+ def savepoints(self):
1448
+ """Target database must support savepoints."""
1449
+
1450
+ return exclusions.closed()
1451
+
1452
+ @property
1453
+ def two_phase_transactions(self):
1454
+ """Target database must support two-phase transactions."""
1455
+
1456
+ return exclusions.closed()
1457
+
1458
+ @property
1459
+ def update_from(self):
1460
+ """Target must support UPDATE..FROM syntax"""
1461
+ return exclusions.closed()
1462
+
1463
+ @property
1464
+ def delete_from(self):
1465
+ """Target must support DELETE FROM..FROM or DELETE..USING syntax"""
1466
+ return exclusions.closed()
1467
+
1468
+ @property
1469
+ def update_where_target_in_subquery(self):
1470
+ """Target must support UPDATE (or DELETE) where the same table is
1471
+ present in a subquery in the WHERE clause.
1472
+
1473
+ This is an ANSI-standard syntax that apparently MySQL can't handle,
1474
+ such as:
1475
+
1476
+ .. sourcecode:: sql
1477
+
1478
+ UPDATE documents SET flag=1 WHERE documents.title IN
1479
+ (SELECT max(documents.title) AS title
1480
+ FROM documents GROUP BY documents.user_id
1481
+ )
1482
+
1483
+ """
1484
+ return exclusions.open()
1485
+
1486
+ @property
1487
+ def mod_operator_as_percent_sign(self):
1488
+ """target database must use a plain percent '%' as the 'modulus'
1489
+ operator."""
1490
+ return exclusions.closed()
1491
+
1492
+ @property
1493
+ def percent_schema_names(self):
1494
+ """target backend supports weird identifiers with percent signs
1495
+ in them, e.g. 'some % column'.
1496
+
1497
+ this is a very weird use case but often has problems because of
1498
+ DBAPIs that use python formatting. It's not a critical use
1499
+ case either.
1500
+
1501
+ """
1502
+ return exclusions.closed()
1503
+
1504
+ @property
1505
+ def order_by_col_from_union(self):
1506
+ """target database supports ordering by a column from a SELECT
1507
+ inside of a UNION
1508
+
1509
+ E.g.:
1510
+
1511
+ .. sourcecode:: sql
1512
+
1513
+ (SELECT id, ...) UNION (SELECT id, ...) ORDER BY id
1514
+
1515
+ """
1516
+ return exclusions.open()
1517
+
1518
+ @property
1519
+ def order_by_label_with_expression(self):
1520
+ """target backend supports ORDER BY a column label within an
1521
+ expression.
1522
+
1523
+ Basically this:
1524
+
1525
+ .. sourcecode:: sql
1526
+
1527
+ select data as foo from test order by foo || 'bar'
1528
+
1529
+ Lots of databases including PostgreSQL don't support this,
1530
+ so this is off by default.
1531
+
1532
+ """
1533
+ return exclusions.closed()
1534
+
1535
+ @property
1536
+ def order_by_collation(self):
1537
+ def check(config):
1538
+ try:
1539
+ self.get_order_by_collation(config)
1540
+ return False
1541
+ except NotImplementedError:
1542
+ return True
1543
+
1544
+ return exclusions.skip_if(check)
1545
+
1546
+ def get_order_by_collation(self, config):
1547
+ raise NotImplementedError()
1548
+
1549
+ @property
1550
+ def unicode_connections(self):
1551
+ """Target driver must support non-ASCII characters being passed at
1552
+ all.
1553
+ """
1554
+ return exclusions.open()
1555
+
1556
+ @property
1557
+ def graceful_disconnects(self):
1558
+ """Target driver must raise a DBAPI-level exception, such as
1559
+ InterfaceError, when the underlying connection has been closed
1560
+ and the execute() method is called.
1561
+ """
1562
+ return exclusions.open()
1563
+
1564
+ @property
1565
+ def independent_connections(self):
1566
+ """
1567
+ Target must support simultaneous, independent database connections.
1568
+ """
1569
+ return exclusions.open()
1570
+
1571
+ @property
1572
+ def independent_readonly_connections(self):
1573
+ """
1574
+ Target must support simultaneous, independent database connections
1575
+ that will be used in a readonly fashion.
1576
+
1577
+ """
1578
+ return exclusions.open()
1579
+
1580
+ @property
1581
+ def skip_mysql_on_windows(self):
1582
+ """Catchall for a large variety of MySQL on Windows failures"""
1583
+ return exclusions.open()
1584
+
1585
+ @property
1586
+ def ad_hoc_engines(self):
1587
+ """Test environment must allow ad-hoc engine/connection creation.
1588
+
1589
+ No longer used in any tests; is a no-op
1590
+
1591
+ """
1592
+ return exclusions.open()
1593
+
1594
+ @property
1595
+ def no_windows(self):
1596
+ return exclusions.skip_if(self._running_on_windows())
1597
+
1598
+ def _running_on_windows(self):
1599
+ return exclusions.LambdaPredicate(
1600
+ lambda: platform.system() == "Windows",
1601
+ description="running on Windows",
1602
+ )
1603
+
1604
+ @property
1605
+ def only_linux(self):
1606
+ return exclusions.only_if(self._running_on_linux())
1607
+
1608
+ def _running_on_linux(self):
1609
+ return exclusions.LambdaPredicate(
1610
+ lambda: platform.system() == "Linux",
1611
+ description="running on Linux",
1612
+ )
1613
+
1614
+ @property
1615
+ def timing_intensive(self):
1616
+ from . import config
1617
+
1618
+ return config.add_to_marker.timing_intensive
1619
+
1620
+ @property
1621
+ def posix(self):
1622
+ return exclusions.skip_if(lambda: os.name != "posix")
1623
+
1624
+ @property
1625
+ def memory_intensive(self):
1626
+ from . import config
1627
+
1628
+ return config.add_to_marker.memory_intensive
1629
+
1630
+ @property
1631
+ def threading_with_mock(self):
1632
+ """Mark tests that use threading and mock at the same time - stability
1633
+ issues have been observed with coverage
1634
+
1635
+ """
1636
+ return exclusions.skip_if(
1637
+ lambda config: config.options.has_coverage,
1638
+ "Stability issues with coverage",
1639
+ )
1640
+
1641
+ @property
1642
+ def sqlalchemy2_stubs(self):
1643
+ def check(config):
1644
+ try:
1645
+ __import__("sqlalchemy-stubs.ext.mypy")
1646
+ except ImportError:
1647
+ return False
1648
+ else:
1649
+ return True
1650
+
1651
+ return exclusions.only_if(check)
1652
+
1653
+ @property
1654
+ def no_sqlalchemy2_stubs(self):
1655
+ def check(config):
1656
+ try:
1657
+ __import__("sqlalchemy-stubs.ext.mypy")
1658
+ except ImportError:
1659
+ return False
1660
+ else:
1661
+ return True
1662
+
1663
+ return exclusions.skip_if(check)
1664
+
1665
+ @property
1666
+ def python312(self):
1667
+ return exclusions.only_if(
1668
+ lambda: util.py312, "Python 3.12 or above required"
1669
+ )
1670
+
1671
+ @property
1672
+ def python314(self):
1673
+ return exclusions.only_if(
1674
+ lambda: util.py314, "Python 3.14 or above required"
1675
+ )
1676
+
1677
+ @property
1678
+ def fail_python314b1(self):
1679
+ return exclusions.fails_if(
1680
+ lambda: util.compat.py314b1, "Fails as of python 3.14.0b1"
1681
+ )
1682
+
1683
+ @property
1684
+ def not_python314(self):
1685
+ """This requirement is interim to assist with backporting of
1686
+ issue #12405.
1687
+
1688
+ SQLAlchemy 2.0 still includes the ``await_fallback()`` method that
1689
+ makes use of ``asyncio.get_event_loop_policy()``. This is removed
1690
+ in SQLAlchemy 2.1.
1691
+
1692
+ """
1693
+ return exclusions.skip_if(
1694
+ lambda: util.py314, "Python 3.14 or above not supported"
1695
+ )
1696
+
1697
+ @property
1698
+ def pep649(self):
1699
+ """pep649 deferred evaluation of annotations without future mode"""
1700
+ return self.python314
1701
+
1702
+ @property
1703
+ def cpython(self):
1704
+ return exclusions.only_if(
1705
+ lambda: util.cpython, "cPython interpreter needed"
1706
+ )
1707
+
1708
+ @property
1709
+ def gil_enabled(self):
1710
+ return exclusions.only_if(
1711
+ lambda: not util.freethreading, "GIL-enabled build needed"
1712
+ )
1713
+
1714
+ @property
1715
+ def freethreading(self):
1716
+ return exclusions.only_if(
1717
+ lambda: util.freethreading, "free-threaded build needed"
1718
+ )
1719
+
1720
+ @property
1721
+ def is64bit(self):
1722
+ return exclusions.only_if(lambda: util.is64bit, "64bit required")
1723
+
1724
+ @property
1725
+ def patch_library(self):
1726
+ def check_lib():
1727
+ try:
1728
+ __import__("patch")
1729
+ except ImportError:
1730
+ return False
1731
+ else:
1732
+ return True
1733
+
1734
+ return exclusions.only_if(check_lib, "patch library needed")
1735
+
1736
+ @property
1737
+ def predictable_gc(self):
1738
+ """target platform must remove all cycles unconditionally when
1739
+ gc.collect() is called, as well as clean out unreferenced subclasses.
1740
+
1741
+ """
1742
+ return self.cpython + self.gil_enabled
1743
+
1744
+ @property
1745
+ def no_coverage(self):
1746
+ """Test should be skipped if coverage is enabled.
1747
+
1748
+ This is to block tests that exercise libraries that seem to be
1749
+ sensitive to coverage, such as PostgreSQL notice logging.
1750
+
1751
+ """
1752
+ return exclusions.skip_if(
1753
+ lambda config: config.options.has_coverage,
1754
+ "Issues observed when coverage is enabled",
1755
+ )
1756
+
1757
+ def _has_mysql_on_windows(self, config):
1758
+ return False
1759
+
1760
+ def _has_mysql_fully_case_sensitive(self, config):
1761
+ return False
1762
+
1763
+ @property
1764
+ def sqlite(self):
1765
+ return exclusions.skip_if(lambda: not self._has_sqlite())
1766
+
1767
+ @property
1768
+ def cextensions(self):
1769
+ return exclusions.skip_if(
1770
+ lambda: not util.has_compiled_ext(),
1771
+ "Cython extensions not installed",
1772
+ )
1773
+
1774
+ def _has_sqlite(self):
1775
+ from sqlalchemy import create_engine
1776
+
1777
+ try:
1778
+ create_engine("sqlite://")
1779
+ return True
1780
+ except ImportError:
1781
+ return False
1782
+
1783
+ @property
1784
+ def async_dialect(self):
1785
+ """dialect makes use of await_() to invoke operations on the
1786
+ DBAPI."""
1787
+
1788
+ return exclusions.closed()
1789
+
1790
+ @property
1791
+ def asyncio(self):
1792
+ return self.greenlet
1793
+
1794
+ @property
1795
+ def no_greenlet(self):
1796
+ def go(config):
1797
+ try:
1798
+ import greenlet # noqa: F401
1799
+ except ImportError:
1800
+ return True
1801
+ else:
1802
+ return False
1803
+
1804
+ return exclusions.only_if(go)
1805
+
1806
+ @property
1807
+ def greenlet(self):
1808
+ def go(config):
1809
+ if not _test_asyncio.ENABLE_ASYNCIO:
1810
+ return False
1811
+
1812
+ try:
1813
+ import greenlet # noqa: F401
1814
+ except ImportError:
1815
+ return False
1816
+ else:
1817
+ return True
1818
+
1819
+ return exclusions.only_if(go)
1820
+
1821
+ @property
1822
+ def computed_columns(self):
1823
+ "Supports computed columns"
1824
+ return exclusions.closed()
1825
+
1826
+ @property
1827
+ def computed_columns_stored(self):
1828
+ "Supports computed columns with `persisted=True`"
1829
+ return exclusions.closed()
1830
+
1831
+ @property
1832
+ def computed_columns_virtual(self):
1833
+ "Supports computed columns with `persisted=False`"
1834
+ return exclusions.closed()
1835
+
1836
+ @property
1837
+ def computed_columns_default_persisted(self):
1838
+ """If the default persistence is virtual or stored when `persisted`
1839
+ is omitted"""
1840
+ return exclusions.closed()
1841
+
1842
+ @property
1843
+ def computed_columns_reflect_persisted(self):
1844
+ """If persistence information is returned by the reflection of
1845
+ computed columns"""
1846
+ return exclusions.closed()
1847
+
1848
+ @property
1849
+ def supports_distinct_on(self):
1850
+ """If a backend supports the DISTINCT ON in a select"""
1851
+ return exclusions.closed()
1852
+
1853
+ @property
1854
+ def supports_is_distinct_from(self):
1855
+ """Supports some form of "x IS [NOT] DISTINCT FROM y" construct.
1856
+ Different dialects will implement their own flavour, e.g.,
1857
+ sqlite will emit "x IS NOT y" instead of "x IS DISTINCT FROM y".
1858
+
1859
+ .. seealso::
1860
+
1861
+ :meth:`.ColumnOperators.is_distinct_from`
1862
+
1863
+ """
1864
+ return exclusions.skip_if(
1865
+ lambda config: not config.db.dialect.supports_is_distinct_from,
1866
+ "driver doesn't support an IS DISTINCT FROM construct",
1867
+ )
1868
+
1869
+ @property
1870
+ def identity_columns(self):
1871
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1872
+ AS IDENTITY"""
1873
+ return exclusions.closed()
1874
+
1875
+ @property
1876
+ def identity_columns_standard(self):
1877
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1878
+ AS IDENTITY with a standard syntax.
1879
+ This is mainly to exclude MSSql.
1880
+ """
1881
+ return exclusions.closed()
1882
+
1883
+ @property
1884
+ def regexp_match(self):
1885
+ """backend supports the regexp_match operator."""
1886
+ return exclusions.closed()
1887
+
1888
+ @property
1889
+ def regexp_replace(self):
1890
+ """backend supports the regexp_replace operator."""
1891
+ return exclusions.closed()
1892
+
1893
+ @property
1894
+ def fetch_first(self):
1895
+ """backend supports the fetch first clause."""
1896
+ return exclusions.closed()
1897
+
1898
+ @property
1899
+ def fetch_percent(self):
1900
+ """backend supports the fetch first clause with percent."""
1901
+ return exclusions.closed()
1902
+
1903
+ @property
1904
+ def fetch_ties(self):
1905
+ """backend supports the fetch first clause with ties."""
1906
+ return exclusions.closed()
1907
+
1908
+ @property
1909
+ def fetch_no_order_by(self):
1910
+ """backend supports the fetch first without order by"""
1911
+ return exclusions.closed()
1912
+
1913
+ @property
1914
+ def fetch_offset_with_options(self):
1915
+ """backend supports the offset when using fetch first with percent
1916
+ or ties. basically this is "not mssql"
1917
+ """
1918
+ return exclusions.closed()
1919
+
1920
+ @property
1921
+ def fetch_expression(self):
1922
+ """backend supports fetch / offset with expression in them, like
1923
+
1924
+ SELECT * FROM some_table
1925
+ OFFSET 1 + 1 ROWS FETCH FIRST 1 + 1 ROWS ONLY
1926
+ """
1927
+ return exclusions.closed()
1928
+
1929
+ @property
1930
+ def autoincrement_without_sequence(self):
1931
+ """If autoincrement=True on a column does not require an explicit
1932
+ sequence. This should be false only for oracle.
1933
+ """
1934
+ return exclusions.open()
1935
+
1936
+ @property
1937
+ def generic_classes(self):
1938
+ "If X[Y] can be implemented with ``__class_getitem__``. py3.7+"
1939
+ return exclusions.open()
1940
+
1941
+ @property
1942
+ def json_deserializer_binary(self):
1943
+ "indicates if the json_deserializer function is called with bytes"
1944
+ return exclusions.closed()
1945
+
1946
+ @property
1947
+ def reflect_table_options(self):
1948
+ """Target database must support reflecting table_options."""
1949
+ return exclusions.closed()
1950
+
1951
+ @property
1952
+ def materialized_views(self):
1953
+ """Target database must support MATERIALIZED VIEWs."""
1954
+ return exclusions.closed()
1955
+
1956
+ @property
1957
+ def materialized_views_reflect_pk(self):
1958
+ """Target database reflect MATERIALIZED VIEWs pks."""
1959
+ return exclusions.closed()
1960
+
1961
+ @property
1962
+ def supports_bitwise_or(self):
1963
+ """Target database supports bitwise or"""
1964
+ return exclusions.closed()
1965
+
1966
+ @property
1967
+ def supports_bitwise_and(self):
1968
+ """Target database supports bitwise and"""
1969
+ return exclusions.closed()
1970
+
1971
+ @property
1972
+ def supports_bitwise_not(self):
1973
+ """Target database supports bitwise not"""
1974
+ return exclusions.closed()
1975
+
1976
+ @property
1977
+ def supports_bitwise_xor(self):
1978
+ """Target database supports bitwise xor"""
1979
+ return exclusions.closed()
1980
+
1981
+ @property
1982
+ def supports_bitwise_shift(self):
1983
+ """Target database supports bitwise left or right shift"""
1984
+ return exclusions.closed()
1985
+
1986
+ @property
1987
+ def like_escapes(self):
1988
+ """Target backend supports custom ESCAPE characters
1989
+ with LIKE comparisons"""
1990
+ return exclusions.open()