SQLAlchemy 2.1.0rc1__cp315-cp315-win32.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 +242 -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 +898 -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 +5935 -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 +3103 -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.cp315-win32.pyd +0 -0
  77. sqlalchemy/engine/_processors_cy.py +92 -0
  78. sqlalchemy/engine/_result_cy.cp315-win32.pyd +0 -0
  79. sqlalchemy/engine/_result_cy.py +711 -0
  80. sqlalchemy/engine/_row_cy.cp315-win32.pyd +0 -0
  81. sqlalchemy/engine/_row_cy.py +232 -0
  82. sqlalchemy/engine/_util_cy.cp315-win32.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 +3636 -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 +1487 -0
  112. sqlalchemy/ext/asyncio/exc.py +21 -0
  113. sqlalchemy/ext/asyncio/result.py +994 -0
  114. sqlalchemy/ext/asyncio/scoping.py +1679 -0
  115. sqlalchemy/ext/asyncio/session.py +2006 -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 +2694 -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 +2283 -0
  142. sqlalchemy/orm/decl_base.py +2320 -0
  143. sqlalchemy/orm/dependency.py +1306 -0
  144. sqlalchemy/orm/descriptor_props.py +1183 -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 +3608 -0
  160. sqlalchemy/orm/scoping.py +2233 -0
  161. sqlalchemy/orm/session.py +5468 -0
  162. sqlalchemy/orm/state.py +1175 -0
  163. sqlalchemy/orm/state_changes.py +196 -0
  164. sqlalchemy/orm/strategies.py +3552 -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 +2461 -0
  169. sqlalchemy/orm/writeonly.py +701 -0
  170. sqlalchemy/pool/__init__.py +41 -0
  171. sqlalchemy/pool/base.py +1540 -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.cp315-win32.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.cp315-win32.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 +2702 -0
  190. sqlalchemy/sql/cache_key.py +915 -0
  191. sqlalchemy/sql/coercions.py +1373 -0
  192. sqlalchemy/sql/compiler.py +8453 -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 +6057 -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 +7075 -0
  206. sqlalchemy/sql/selectable.py +7634 -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 +482 -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 +1971 -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 +776 -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 +139 -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.cp315-win32.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.cp315-win32.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 +2797 -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.0rc1.dist-info/METADATA +270 -0
  272. sqlalchemy-2.1.0rc1.dist-info/RECORD +276 -0
  273. sqlalchemy-2.1.0rc1.dist-info/WHEEL +5 -0
  274. sqlalchemy-2.1.0rc1.dist-info/licenses/AUTHORS +30 -0
  275. sqlalchemy-2.1.0rc1.dist-info/licenses/LICENSE +19 -0
  276. sqlalchemy-2.1.0rc1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1971 @@
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 insert_executemany_returning(self):
488
+ """target platform supports RETURNING when INSERT is used with
489
+ executemany(), e.g. multiple parameter sets, indicating
490
+ as many rows come back as do parameter sets were passed.
491
+
492
+ """
493
+
494
+ return exclusions.only_if(
495
+ lambda config: config.db.dialect.insert_executemany_returning,
496
+ "%(database)s %(does_support)s 'RETURNING of "
497
+ "multiple rows with INSERT executemany'",
498
+ )
499
+
500
+ @property
501
+ def insertmanyvalues(self):
502
+ return exclusions.only_if(
503
+ lambda config: config.db.dialect.supports_multivalues_insert
504
+ and config.db.dialect.insert_returning
505
+ and config.db.dialect.use_insertmanyvalues,
506
+ "%(database)s %(does_support)s 'insertmanyvalues functionality",
507
+ )
508
+
509
+ @property
510
+ def tuple_in(self):
511
+ """Target platform supports the syntax
512
+ "(x, y) IN ((x1, y1), (x2, y2), ...)"
513
+ """
514
+
515
+ return exclusions.closed()
516
+
517
+ @property
518
+ def tuple_in_w_empty(self):
519
+ """Target platform tuple IN w/ empty set"""
520
+ return self.tuple_in
521
+
522
+ @property
523
+ def duplicate_names_in_cursor_description(self):
524
+ """target platform supports a SELECT statement that has
525
+ the same name repeated more than once in the columns list."""
526
+
527
+ return exclusions.open()
528
+
529
+ @property
530
+ def denormalized_names(self):
531
+ """Target database must have 'denormalized', i.e.
532
+ UPPERCASE as case insensitive names."""
533
+
534
+ return exclusions.skip_if(
535
+ lambda config: not config.db.dialect.requires_name_normalize,
536
+ "Backend does not require denormalized names.",
537
+ )
538
+
539
+ @property
540
+ def multivalues_inserts(self):
541
+ """target database must support multiple VALUES clauses in an
542
+ INSERT statement."""
543
+
544
+ return exclusions.skip_if(
545
+ lambda config: not config.db.dialect.supports_multivalues_insert,
546
+ "Backend does not support multirow inserts.",
547
+ )
548
+
549
+ @property
550
+ def implements_get_lastrowid(self):
551
+ """target dialect implements the executioncontext.get_lastrowid()
552
+ method without reliance on RETURNING.
553
+
554
+ """
555
+ return exclusions.open()
556
+
557
+ @property
558
+ def arraysize(self):
559
+ """dialect includes the required pep-249 attribute
560
+ ``cursor.arraysize``"""
561
+
562
+ return exclusions.open()
563
+
564
+ @property
565
+ def emulated_lastrowid(self):
566
+ """target dialect retrieves cursor.lastrowid, or fetches
567
+ from a database-side function after an insert() construct executes,
568
+ within the get_lastrowid() method.
569
+
570
+ Only dialects that "pre-execute", or need RETURNING to get last
571
+ inserted id, would return closed/fail/skip for this.
572
+
573
+ """
574
+ return exclusions.closed()
575
+
576
+ @property
577
+ def emulated_lastrowid_even_with_sequences(self):
578
+ """target dialect retrieves cursor.lastrowid or an equivalent
579
+ after an insert() construct executes, even if the table has a
580
+ Sequence on it.
581
+
582
+ """
583
+ return exclusions.closed()
584
+
585
+ @property
586
+ def dbapi_lastrowid(self):
587
+ """target platform includes a 'lastrowid' accessor on the DBAPI
588
+ cursor object.
589
+
590
+ """
591
+ return exclusions.closed()
592
+
593
+ @property
594
+ def views(self):
595
+ """Target database must support VIEWs."""
596
+
597
+ return exclusions.closed()
598
+
599
+ @property
600
+ def schemas(self):
601
+ """Target database must support external schemas, and have one
602
+ named 'test_schema'."""
603
+
604
+ return only_on(lambda config: config.db.dialect.supports_schemas)
605
+
606
+ @property
607
+ def cross_schema_fk_reflection(self):
608
+ """target system must support reflection of inter-schema
609
+ foreign keys"""
610
+ return exclusions.closed()
611
+
612
+ @property
613
+ def foreign_key_constraint_name_reflection(self):
614
+ """Target supports reflection of FOREIGN KEY constraints and
615
+ will return the name of the constraint that was used in the
616
+ "CONSTRAINT <name> FOREIGN KEY" DDL.
617
+
618
+ MySQL prior to version 8 and MariaDB prior to version 10.5
619
+ don't support this.
620
+
621
+ """
622
+ return exclusions.closed()
623
+
624
+ @property
625
+ def implicit_default_schema(self):
626
+ """target system has a strong concept of 'default' schema that can
627
+ be referred to implicitly.
628
+
629
+ basically, PostgreSQL.
630
+
631
+ """
632
+ return exclusions.closed()
633
+
634
+ @property
635
+ def default_schema_name_switch(self):
636
+ """target dialect implements provisioning module including
637
+ set_default_schema_on_connection"""
638
+
639
+ return exclusions.closed()
640
+
641
+ @property
642
+ def server_side_cursors(self):
643
+ """Target dialect must support server side cursors."""
644
+
645
+ return exclusions.only_if(
646
+ [lambda config: config.db.dialect.supports_server_side_cursors],
647
+ "no server side cursors support",
648
+ )
649
+
650
+ @property
651
+ def sequences(self):
652
+ """Target database must support SEQUENCEs."""
653
+
654
+ return exclusions.only_if(
655
+ [lambda config: config.db.dialect.supports_sequences],
656
+ "no sequence support",
657
+ )
658
+
659
+ @property
660
+ def no_sequences(self):
661
+ """the opposite of "sequences", DB does not support sequences at
662
+ all."""
663
+
664
+ return exclusions.NotPredicate(self.sequences)
665
+
666
+ @property
667
+ def sequences_optional(self):
668
+ """Target database supports sequences, but also optionally
669
+ as a means of generating new PK values."""
670
+
671
+ return exclusions.only_if(
672
+ [
673
+ lambda config: config.db.dialect.supports_sequences
674
+ and config.db.dialect.sequences_optional
675
+ ],
676
+ "no sequence support, or sequences not optional",
677
+ )
678
+
679
+ @property
680
+ def supports_lastrowid(self):
681
+ """target database / driver supports cursor.lastrowid as a means
682
+ of retrieving the last inserted primary key value.
683
+
684
+ note that if the target DB supports sequences also, this is still
685
+ assumed to work. This is a new use case brought on by MariaDB 10.3.
686
+
687
+ """
688
+ return exclusions.only_if(
689
+ [lambda config: config.db.dialect.postfetch_lastrowid]
690
+ )
691
+
692
+ @property
693
+ def no_lastrowid_support(self):
694
+ """the opposite of supports_lastrowid"""
695
+ return exclusions.only_if(
696
+ [lambda config: not config.db.dialect.postfetch_lastrowid]
697
+ )
698
+
699
+ @property
700
+ def reflects_pk_names(self):
701
+ return exclusions.closed()
702
+
703
+ @property
704
+ def table_reflection(self):
705
+ """target database has general support for table reflection"""
706
+ return exclusions.open()
707
+
708
+ @property
709
+ def reflect_tables_no_columns(self):
710
+ """target database supports creation and reflection of tables with no
711
+ columns, or at least tables that seem to have no columns."""
712
+
713
+ return exclusions.closed()
714
+
715
+ @property
716
+ def temp_table_comment_reflection(self):
717
+ """indicates if database supports comments on temp tables and
718
+ the dialect can reflect them"""
719
+ return exclusions.closed()
720
+
721
+ @property
722
+ def comment_reflection(self):
723
+ """Indicates if the database support table comment reflection"""
724
+ return exclusions.closed()
725
+
726
+ @property
727
+ def comment_reflection_full_unicode(self):
728
+ """Indicates if the database support table comment reflection in the
729
+ full unicode range, including emoji etc.
730
+ """
731
+ return exclusions.closed()
732
+
733
+ @property
734
+ def constraint_comment_reflection(self):
735
+ """indicates if the database support comments on constraints
736
+ and their reflection"""
737
+ return exclusions.closed()
738
+
739
+ @property
740
+ def column_collation_reflection(self):
741
+ """Indicates if the database support column collation reflection.
742
+
743
+ This requirement also uses ``get_order_by_collation`` to get
744
+ an available collation.
745
+ """
746
+ return exclusions.closed()
747
+
748
+ @property
749
+ def view_column_reflection(self):
750
+ """target database must support retrieval of the columns in a view,
751
+ similarly to how a table is inspected.
752
+
753
+ This does not include the full CREATE VIEW definition.
754
+
755
+ """
756
+ return self.views
757
+
758
+ @property
759
+ def view_reflection(self):
760
+ """target database must support inspection of the full CREATE VIEW
761
+ definition."""
762
+ return self.views
763
+
764
+ @property
765
+ def schema_reflection(self):
766
+ return self.schemas
767
+
768
+ @property
769
+ def schema_create_delete(self):
770
+ """target database supports schema create and dropped with
771
+ 'CREATE SCHEMA' and 'DROP SCHEMA'"""
772
+ return exclusions.closed()
773
+
774
+ @property
775
+ def primary_key_constraint_reflection(self):
776
+ return exclusions.open()
777
+
778
+ @property
779
+ def foreign_key_constraint_reflection(self):
780
+ return exclusions.open()
781
+
782
+ @property
783
+ def foreign_key_constraint_option_reflection_ondelete(self):
784
+ return exclusions.closed()
785
+
786
+ @property
787
+ def fk_constraint_option_reflection_ondelete_restrict(self):
788
+ return exclusions.closed()
789
+
790
+ @property
791
+ def fk_constraint_option_reflection_ondelete_noaction(self):
792
+ return exclusions.closed()
793
+
794
+ @property
795
+ def foreign_key_constraint_option_reflection_onupdate(self):
796
+ return exclusions.closed()
797
+
798
+ @property
799
+ def fk_constraint_option_reflection_onupdate_restrict(self):
800
+ return exclusions.closed()
801
+
802
+ @property
803
+ def temp_table_reflection(self):
804
+ return exclusions.open()
805
+
806
+ @property
807
+ def temp_table_reflect_indexes(self):
808
+ return self.temp_table_reflection
809
+
810
+ @property
811
+ def temp_table_names(self):
812
+ """target dialect supports listing of temporary table names"""
813
+ return exclusions.closed()
814
+
815
+ @property
816
+ def has_temp_table(self):
817
+ """target dialect supports checking a single temp table name"""
818
+ return exclusions.closed()
819
+
820
+ @property
821
+ def temporary_tables(self):
822
+ """target database supports temporary tables"""
823
+ return exclusions.open()
824
+
825
+ @property
826
+ def temporary_views(self):
827
+ """target database supports temporary views"""
828
+ return exclusions.closed()
829
+
830
+ @property
831
+ def create_or_replace_view(self):
832
+ """target database supports CREATE OR REPLACE VIEW"""
833
+ return exclusions.closed()
834
+
835
+ @property
836
+ def index_reflection(self):
837
+ return exclusions.open()
838
+
839
+ @property
840
+ def index_reflects_included_columns(self):
841
+ return exclusions.closed()
842
+
843
+ @property
844
+ def indexes_with_ascdesc(self):
845
+ """target database supports CREATE INDEX with per-column ASC/DESC."""
846
+ return exclusions.open()
847
+
848
+ @property
849
+ def reflect_indexes_with_ascdesc(self):
850
+ """target database supports reflecting INDEX with per-column
851
+ ASC/DESC."""
852
+ return exclusions.open()
853
+
854
+ @property
855
+ def reflect_indexes_with_ascdesc_as_expression(self):
856
+ """target database supports reflecting INDEX with per-column
857
+ ASC/DESC but reflects them as expressions (like oracle)."""
858
+ return exclusions.closed()
859
+
860
+ @property
861
+ def indexes_check_column_order(self):
862
+ """target database supports CREATE INDEX with column order check."""
863
+ return exclusions.closed()
864
+
865
+ @property
866
+ def indexes_with_expressions(self):
867
+ """target database supports CREATE INDEX against SQL expressions."""
868
+ return exclusions.closed()
869
+
870
+ @property
871
+ def reflect_indexes_with_expressions(self):
872
+ """target database supports reflection of indexes with
873
+ SQL expressions."""
874
+ return exclusions.closed()
875
+
876
+ @property
877
+ def unique_constraint_reflection(self):
878
+ """target dialect supports reflection of unique constraints"""
879
+ return exclusions.open()
880
+
881
+ @property
882
+ def inline_check_constraint_reflection(self):
883
+ """target dialect supports reflection of inline check constraints"""
884
+ return exclusions.closed()
885
+
886
+ @property
887
+ def check_constraint_reflection(self):
888
+ """target dialect supports reflection of check constraints"""
889
+ return exclusions.closed()
890
+
891
+ @property
892
+ def duplicate_key_raises_integrity_error(self):
893
+ """target dialect raises IntegrityError when reporting an INSERT
894
+ with a primary key violation. (hint: it should)
895
+
896
+ """
897
+ return exclusions.open()
898
+
899
+ @property
900
+ def unbounded_varchar(self):
901
+ """Target database must support VARCHAR with no length"""
902
+
903
+ return exclusions.open()
904
+
905
+ @property
906
+ def nvarchar_types(self):
907
+ """target database supports NVARCHAR and NCHAR as an actual datatype"""
908
+ return exclusions.closed()
909
+
910
+ @property
911
+ def unicode_data_no_special_types(self):
912
+ """Target database/dialect can receive / deliver / compare data with
913
+ non-ASCII characters in plain VARCHAR, TEXT columns, without the need
914
+ for special "national" datatypes like NVARCHAR or similar.
915
+
916
+ """
917
+ return exclusions.open()
918
+
919
+ @property
920
+ def unicode_data(self):
921
+ """Target database/dialect must support Python unicode objects with
922
+ non-ASCII characters represented, delivered as bound parameters
923
+ as well as in result rows.
924
+
925
+ """
926
+ return exclusions.open()
927
+
928
+ @property
929
+ def unicode_ddl(self):
930
+ """Target driver must support some degree of non-ascii symbol
931
+ names.
932
+ """
933
+ return exclusions.closed()
934
+
935
+ @property
936
+ def symbol_names_w_double_quote(self):
937
+ """Target driver can create tables with a name like 'some " table'"""
938
+ return exclusions.open()
939
+
940
+ @property
941
+ def datetime_interval(self):
942
+ """target dialect supports rendering of a datetime.timedelta as a
943
+ literal string, e.g. via the TypeEngine.literal_processor() method.
944
+
945
+ """
946
+ return exclusions.closed()
947
+
948
+ @property
949
+ def datetime_literals(self):
950
+ """target dialect supports rendering of a date, time, or datetime as a
951
+ literal string, e.g. via the TypeEngine.literal_processor() method.
952
+
953
+ """
954
+
955
+ return exclusions.closed()
956
+
957
+ @property
958
+ def datetime(self):
959
+ """target dialect supports representation of Python
960
+ datetime.datetime() objects."""
961
+
962
+ return exclusions.open()
963
+
964
+ @property
965
+ def datetime_timezone(self):
966
+ """target dialect supports representation of Python
967
+ datetime.datetime() with tzinfo with DateTime(timezone=True)."""
968
+
969
+ return exclusions.closed()
970
+
971
+ @property
972
+ def time_timezone(self):
973
+ """target dialect supports representation of Python
974
+ datetime.time() with tzinfo with Time(timezone=True)."""
975
+
976
+ return exclusions.closed()
977
+
978
+ @property
979
+ def date_implicit_bound(self):
980
+ """target dialect when given a date object will bind it such
981
+ that the database server knows the object is a date, and not
982
+ a plain string.
983
+
984
+ """
985
+ return exclusions.open()
986
+
987
+ @property
988
+ def time_implicit_bound(self):
989
+ """target dialect when given a time object will bind it such
990
+ that the database server knows the object is a time, and not
991
+ a plain string.
992
+
993
+ """
994
+ return exclusions.open()
995
+
996
+ @property
997
+ def datetime_implicit_bound(self):
998
+ """target dialect when given a datetime object will bind it such
999
+ that the database server knows the object is a datetime, and not
1000
+ a plain string.
1001
+
1002
+ """
1003
+ return exclusions.open()
1004
+
1005
+ @property
1006
+ def datetime_microseconds(self):
1007
+ """target dialect supports representation of Python
1008
+ datetime.datetime() with microsecond objects."""
1009
+
1010
+ return exclusions.open()
1011
+
1012
+ @property
1013
+ def timestamp_microseconds(self):
1014
+ """target dialect supports representation of Python
1015
+ datetime.datetime() with microsecond objects but only
1016
+ if TIMESTAMP is used."""
1017
+ return exclusions.closed()
1018
+
1019
+ @property
1020
+ def timestamp_microseconds_implicit_bound(self):
1021
+ """target dialect when given a datetime object which also includes
1022
+ a microseconds portion when using the TIMESTAMP data type
1023
+ will bind it such that the database server knows
1024
+ the object is a datetime with microseconds, and not a plain string.
1025
+
1026
+ """
1027
+ return self.timestamp_microseconds
1028
+
1029
+ @property
1030
+ def datetime_historic(self):
1031
+ """target dialect supports representation of Python
1032
+ datetime.datetime() objects with historic (pre 1970) values."""
1033
+
1034
+ return exclusions.closed()
1035
+
1036
+ @property
1037
+ def date(self):
1038
+ """target dialect supports representation of Python
1039
+ datetime.date() objects."""
1040
+
1041
+ return exclusions.open()
1042
+
1043
+ @property
1044
+ def date_coerces_from_datetime(self):
1045
+ """target dialect accepts a datetime object as the target
1046
+ of a date column."""
1047
+
1048
+ return exclusions.open()
1049
+
1050
+ @property
1051
+ def date_historic(self):
1052
+ """target dialect supports representation of Python
1053
+ datetime.datetime() objects with historic (pre 1970) values."""
1054
+
1055
+ return exclusions.closed()
1056
+
1057
+ @property
1058
+ def time(self):
1059
+ """target dialect supports representation of Python
1060
+ datetime.time() objects."""
1061
+
1062
+ return exclusions.open()
1063
+
1064
+ @property
1065
+ def time_microseconds(self):
1066
+ """target dialect supports representation of Python
1067
+ datetime.time() with microsecond objects."""
1068
+
1069
+ return exclusions.open()
1070
+
1071
+ @property
1072
+ def binary_comparisons(self):
1073
+ """target database/driver can allow BLOB/BINARY fields to be compared
1074
+ against a bound parameter value.
1075
+ """
1076
+
1077
+ return exclusions.open()
1078
+
1079
+ @property
1080
+ def binary_literals(self):
1081
+ """target backend supports simple binary literals, e.g. an
1082
+ expression like:
1083
+
1084
+ .. sourcecode:: sql
1085
+
1086
+ SELECT CAST('foo' AS BINARY)
1087
+
1088
+ Where ``BINARY`` is the type emitted from :class:`.LargeBinary`,
1089
+ e.g. it could be ``BLOB`` or similar.
1090
+
1091
+ Basically fails on Oracle.
1092
+
1093
+ """
1094
+
1095
+ return exclusions.open()
1096
+
1097
+ @property
1098
+ def autocommit(self):
1099
+ """target dialect supports 'AUTOCOMMIT' as an isolation_level"""
1100
+ return exclusions.closed()
1101
+
1102
+ @property
1103
+ def skip_autocommit_rollback(self):
1104
+ """target dialect supports the detect_autocommit_setting() method and
1105
+ uses the default implementation of do_rollback()"""
1106
+
1107
+ return exclusions.closed()
1108
+
1109
+ @property
1110
+ def isolation_level(self):
1111
+ """target dialect supports general isolation level settings.
1112
+
1113
+ Note that this requirement, when enabled, also requires that
1114
+ the get_isolation_levels() method be implemented.
1115
+
1116
+ """
1117
+ return exclusions.closed()
1118
+
1119
+ def get_isolation_levels(self, config):
1120
+ """Return a structure of supported isolation levels for the current
1121
+ testing dialect.
1122
+
1123
+ The structure indicates to the testing suite what the expected
1124
+ "default" isolation should be, as well as the other values that
1125
+ are accepted. The dictionary has two keys, "default" and "supported".
1126
+ The "supported" key refers to a list of all supported levels and
1127
+ it should include AUTOCOMMIT if the dialect supports it.
1128
+
1129
+ If the :meth:`.DefaultRequirements.isolation_level` requirement is
1130
+ not open, then this method has no return value.
1131
+
1132
+ E.g.::
1133
+
1134
+ >>> testing.requirements.get_isolation_levels()
1135
+ {
1136
+ "default": "READ_COMMITTED",
1137
+ "supported": [
1138
+ "SERIALIZABLE", "READ UNCOMMITTED",
1139
+ "READ COMMITTED", "REPEATABLE READ",
1140
+ "AUTOCOMMIT"
1141
+ ]
1142
+ }
1143
+ """
1144
+ with config.db.connect() as conn:
1145
+ try:
1146
+ supported = conn.dialect.get_isolation_level_values(
1147
+ conn.connection.dbapi_connection
1148
+ )
1149
+ except NotImplementedError:
1150
+ return None
1151
+ else:
1152
+ return {
1153
+ "default": conn.dialect.default_isolation_level,
1154
+ "supported": supported,
1155
+ }
1156
+
1157
+ @property
1158
+ def get_isolation_level_values(self):
1159
+ """target dialect supports the
1160
+ :meth:`_engine.Dialect.get_isolation_level_values`
1161
+ method added in SQLAlchemy 2.0.
1162
+
1163
+ """
1164
+
1165
+ def go(config):
1166
+ with config.db.connect() as conn:
1167
+ try:
1168
+ conn.dialect.get_isolation_level_values(
1169
+ conn.connection.dbapi_connection
1170
+ )
1171
+ except NotImplementedError:
1172
+ return False
1173
+ else:
1174
+ return True
1175
+
1176
+ return exclusions.only_if(go)
1177
+
1178
+ @property
1179
+ def dialect_level_isolation_level_param(self):
1180
+ """test that the dialect allows the 'isolation_level' argument
1181
+ to be handled by DefaultDialect"""
1182
+
1183
+ def go(config):
1184
+ try:
1185
+ e = create_engine(
1186
+ config.db.url, isolation_level="READ COMMITTED"
1187
+ )
1188
+ except:
1189
+ return False
1190
+ else:
1191
+ return (
1192
+ e.dialect._on_connect_isolation_level == "READ COMMITTED"
1193
+ )
1194
+
1195
+ return exclusions.only_if(go)
1196
+
1197
+ @property
1198
+ def array_type(self):
1199
+ """Target platform implements a native ARRAY type"""
1200
+ return exclusions.closed()
1201
+
1202
+ @property
1203
+ def json_type(self):
1204
+ """target platform implements a native JSON type."""
1205
+
1206
+ return exclusions.closed()
1207
+
1208
+ @property
1209
+ def json_array_indexes(self):
1210
+ """target platform supports numeric array indexes
1211
+ within a JSON structure"""
1212
+
1213
+ return self.json_type
1214
+
1215
+ @property
1216
+ def json_index_supplementary_unicode_element(self):
1217
+ return exclusions.open()
1218
+
1219
+ @property
1220
+ def legacy_unconditional_json_extract(self):
1221
+ """Backend has a JSON_EXTRACT or similar function that returns a
1222
+ valid JSON string in all cases.
1223
+
1224
+ Used to test a legacy feature and is not needed.
1225
+
1226
+ """
1227
+ return exclusions.closed()
1228
+
1229
+ @property
1230
+ def precision_numerics_general(self):
1231
+ """target backend has general support for moderately high-precision
1232
+ numerics."""
1233
+ return exclusions.open()
1234
+
1235
+ @property
1236
+ def precision_numerics_enotation_small(self):
1237
+ """target backend supports Decimal() objects using E notation
1238
+ to represent very small values."""
1239
+ return exclusions.closed()
1240
+
1241
+ @property
1242
+ def precision_numerics_enotation_large(self):
1243
+ """target backend supports Decimal() objects using E notation
1244
+ to represent very large values."""
1245
+ return exclusions.open()
1246
+
1247
+ @property
1248
+ def precision_numerics_many_significant_digits(self):
1249
+ """target backend supports values with many digits on both sides,
1250
+ such as 319438950232418390.273596, 87673.594069654243
1251
+
1252
+ """
1253
+ return exclusions.closed()
1254
+
1255
+ @property
1256
+ def cast_precision_numerics_many_significant_digits(self):
1257
+ """same as precision_numerics_many_significant_digits but within the
1258
+ context of a CAST statement (hello MySQL)
1259
+
1260
+ """
1261
+ return self.precision_numerics_many_significant_digits
1262
+
1263
+ @property
1264
+ def server_defaults(self):
1265
+ """Target backend supports server side defaults for columns"""
1266
+
1267
+ return exclusions.closed()
1268
+
1269
+ @property
1270
+ def expression_server_defaults(self):
1271
+ """Target backend supports server side defaults with SQL expressions
1272
+ for columns"""
1273
+
1274
+ return exclusions.closed()
1275
+
1276
+ @property
1277
+ def implicit_decimal_binds(self):
1278
+ """target backend will return a selected Decimal as a Decimal, not
1279
+ a string.
1280
+
1281
+ e.g.::
1282
+
1283
+ expr = decimal.Decimal("15.7563")
1284
+
1285
+ value = e.scalar(select(literal(expr)))
1286
+
1287
+ assert value == expr
1288
+
1289
+ See :ticket:`4036`
1290
+
1291
+ """
1292
+
1293
+ return exclusions.open()
1294
+
1295
+ @property
1296
+ def numeric_received_as_decimal_untyped(self):
1297
+ """target backend will return result columns that are explicitly
1298
+ against NUMERIC or similar precision-numeric datatypes (not including
1299
+ FLOAT or INT types) as Python Decimal objects, and not as floats
1300
+ or ints, including when no SQLAlchemy-side typing information is
1301
+ associated with the statement (e.g. such as a raw SQL string).
1302
+
1303
+ This should be enabled if either the DBAPI itself returns Decimal
1304
+ objects, or if the dialect has set up DBAPI-specific return type
1305
+ handlers such that Decimal objects come back automatically.
1306
+
1307
+ """
1308
+ return exclusions.open()
1309
+
1310
+ @property
1311
+ def nested_aggregates(self):
1312
+ """target database can select an aggregate from a subquery that's
1313
+ also using an aggregate
1314
+
1315
+ """
1316
+ return exclusions.open()
1317
+
1318
+ @property
1319
+ def aggregate_order_by(self):
1320
+ """target database can use ORDER BY or equivalent in an aggregate
1321
+ function, and dialect supports aggregate_order_by().
1322
+
1323
+ """
1324
+ return exclusions.closed()
1325
+
1326
+ @property
1327
+ def recursive_fk_cascade(self):
1328
+ """target database must support ON DELETE CASCADE on a self-referential
1329
+ foreign key
1330
+
1331
+ """
1332
+ return exclusions.open()
1333
+
1334
+ @property
1335
+ def precision_numerics_retains_significant_digits(self):
1336
+ """A precision numeric type will return empty significant digits,
1337
+ i.e. a value such as 10.000 will come back in Decimal form with
1338
+ the .000 maintained."""
1339
+
1340
+ return exclusions.closed()
1341
+
1342
+ @property
1343
+ def infinity_floats(self):
1344
+ """The Float type can persist and load float('inf'), float('-inf')."""
1345
+
1346
+ return exclusions.closed()
1347
+
1348
+ @property
1349
+ def float_or_double_precision_behaves_generically(self):
1350
+ return exclusions.closed()
1351
+
1352
+ @property
1353
+ def precision_generic_float_type(self):
1354
+ """target backend will return native floating point numbers with at
1355
+ least seven decimal places when using the generic Float type.
1356
+
1357
+ """
1358
+ return exclusions.open()
1359
+
1360
+ @property
1361
+ def literal_float_coercion(self):
1362
+ """target backend will return the exact float value 15.7563
1363
+ with only four significant digits from this statement:
1364
+
1365
+ SELECT :param
1366
+
1367
+ where :param is the Python float 15.7563
1368
+
1369
+ i.e. it does not return 15.75629997253418
1370
+
1371
+ """
1372
+ return exclusions.open()
1373
+
1374
+ @property
1375
+ def floats_to_four_decimals(self):
1376
+ """target backend can return a floating-point number with four
1377
+ significant digits (such as 15.7563) accurately
1378
+ (i.e. without FP inaccuracies, such as 15.75629997253418).
1379
+
1380
+ """
1381
+ return exclusions.open()
1382
+
1383
+ @property
1384
+ def fetch_null_from_numeric(self):
1385
+ """target backend doesn't crash when you try to select a NUMERIC
1386
+ value that has a value of NULL.
1387
+
1388
+ Added to support Pyodbc bug #351.
1389
+ """
1390
+
1391
+ return exclusions.open()
1392
+
1393
+ @property
1394
+ def float_is_numeric(self):
1395
+ """target backend uses Numeric for Float/Dual"""
1396
+
1397
+ return exclusions.open()
1398
+
1399
+ @property
1400
+ def text_type(self):
1401
+ """Target database must support an unbounded Text() "
1402
+ "type such as TEXT or CLOB"""
1403
+
1404
+ return exclusions.open()
1405
+
1406
+ @property
1407
+ def empty_strings_varchar(self):
1408
+ """target database can persist/return an empty string with a
1409
+ varchar.
1410
+
1411
+ """
1412
+ return exclusions.open()
1413
+
1414
+ @property
1415
+ def empty_strings_text(self):
1416
+ """target database can persist/return an empty string with an
1417
+ unbounded text."""
1418
+
1419
+ return exclusions.open()
1420
+
1421
+ @property
1422
+ def expressions_against_unbounded_text(self):
1423
+ """target database supports use of an unbounded textual field in a
1424
+ WHERE clause."""
1425
+
1426
+ return exclusions.open()
1427
+
1428
+ @property
1429
+ def selectone(self):
1430
+ """target driver must support the literal statement 'select 1'"""
1431
+ return exclusions.open()
1432
+
1433
+ @property
1434
+ def savepoints(self):
1435
+ """Target database must support savepoints."""
1436
+
1437
+ return exclusions.closed()
1438
+
1439
+ @property
1440
+ def two_phase_transactions(self):
1441
+ """Target database must support two-phase transactions."""
1442
+
1443
+ return exclusions.closed()
1444
+
1445
+ @property
1446
+ def update_from(self):
1447
+ """Target must support UPDATE..FROM syntax"""
1448
+ return exclusions.closed()
1449
+
1450
+ @property
1451
+ def delete_from(self):
1452
+ """Target must support DELETE FROM..FROM or DELETE..USING syntax"""
1453
+ return exclusions.closed()
1454
+
1455
+ @property
1456
+ def update_where_target_in_subquery(self):
1457
+ """Target must support UPDATE (or DELETE) where the same table is
1458
+ present in a subquery in the WHERE clause.
1459
+
1460
+ This is an ANSI-standard syntax that apparently MySQL can't handle,
1461
+ such as:
1462
+
1463
+ .. sourcecode:: sql
1464
+
1465
+ UPDATE documents SET flag=1 WHERE documents.title IN
1466
+ (SELECT max(documents.title) AS title
1467
+ FROM documents GROUP BY documents.user_id
1468
+ )
1469
+
1470
+ """
1471
+ return exclusions.open()
1472
+
1473
+ @property
1474
+ def mod_operator_as_percent_sign(self):
1475
+ """target database must use a plain percent '%' as the 'modulus'
1476
+ operator."""
1477
+ return exclusions.closed()
1478
+
1479
+ @property
1480
+ def percent_schema_names(self):
1481
+ """target backend supports weird identifiers with percent signs
1482
+ in them, e.g. 'some % column'.
1483
+
1484
+ this is a very weird use case but often has problems because of
1485
+ DBAPIs that use python formatting. It's not a critical use
1486
+ case either.
1487
+
1488
+ """
1489
+ return exclusions.closed()
1490
+
1491
+ @property
1492
+ def order_by_col_from_union(self):
1493
+ """target database supports ordering by a column from a SELECT
1494
+ inside of a UNION
1495
+
1496
+ E.g.:
1497
+
1498
+ .. sourcecode:: sql
1499
+
1500
+ (SELECT id, ...) UNION (SELECT id, ...) ORDER BY id
1501
+
1502
+ """
1503
+ return exclusions.open()
1504
+
1505
+ @property
1506
+ def order_by_label_with_expression(self):
1507
+ """target backend supports ORDER BY a column label within an
1508
+ expression.
1509
+
1510
+ Basically this:
1511
+
1512
+ .. sourcecode:: sql
1513
+
1514
+ select data as foo from test order by foo || 'bar'
1515
+
1516
+ Lots of databases including PostgreSQL don't support this,
1517
+ so this is off by default.
1518
+
1519
+ """
1520
+ return exclusions.closed()
1521
+
1522
+ @property
1523
+ def order_by_collation(self):
1524
+ def check(config):
1525
+ try:
1526
+ self.get_order_by_collation(config)
1527
+ return False
1528
+ except NotImplementedError:
1529
+ return True
1530
+
1531
+ return exclusions.skip_if(check)
1532
+
1533
+ def get_order_by_collation(self, config):
1534
+ raise NotImplementedError()
1535
+
1536
+ @property
1537
+ def unicode_connections(self):
1538
+ """Target driver must support non-ASCII characters being passed at
1539
+ all.
1540
+ """
1541
+ return exclusions.open()
1542
+
1543
+ @property
1544
+ def graceful_disconnects(self):
1545
+ """Target driver must raise a DBAPI-level exception, such as
1546
+ InterfaceError, when the underlying connection has been closed
1547
+ and the execute() method is called.
1548
+ """
1549
+ return exclusions.open()
1550
+
1551
+ @property
1552
+ def independent_connections(self):
1553
+ """
1554
+ Target must support simultaneous, independent database connections.
1555
+ """
1556
+ return exclusions.open()
1557
+
1558
+ @property
1559
+ def independent_readonly_connections(self):
1560
+ """
1561
+ Target must support simultaneous, independent database connections
1562
+ that will be used in a readonly fashion.
1563
+
1564
+ """
1565
+ return exclusions.open()
1566
+
1567
+ @property
1568
+ def skip_mysql_on_windows(self):
1569
+ """Catchall for a large variety of MySQL on Windows failures"""
1570
+ return exclusions.open()
1571
+
1572
+ @property
1573
+ def ad_hoc_engines(self):
1574
+ """Test environment must allow ad-hoc engine/connection creation.
1575
+
1576
+ No longer used in any tests; is a no-op
1577
+
1578
+ """
1579
+ return exclusions.open()
1580
+
1581
+ @property
1582
+ def no_windows(self):
1583
+ return exclusions.skip_if(self._running_on_windows())
1584
+
1585
+ def _running_on_windows(self):
1586
+ return exclusions.LambdaPredicate(
1587
+ lambda: platform.system() == "Windows",
1588
+ description="running on Windows",
1589
+ )
1590
+
1591
+ @property
1592
+ def only_linux(self):
1593
+ return exclusions.only_if(self._running_on_linux())
1594
+
1595
+ def _running_on_linux(self):
1596
+ return exclusions.LambdaPredicate(
1597
+ lambda: platform.system() == "Linux",
1598
+ description="running on Linux",
1599
+ )
1600
+
1601
+ @property
1602
+ def timing_intensive(self):
1603
+ from . import config
1604
+
1605
+ return config.add_to_marker.timing_intensive
1606
+
1607
+ @property
1608
+ def posix(self):
1609
+ return exclusions.skip_if(lambda: os.name != "posix")
1610
+
1611
+ @property
1612
+ def memory_intensive(self):
1613
+ from . import config
1614
+
1615
+ return config.add_to_marker.memory_intensive
1616
+
1617
+ @property
1618
+ def threading_with_mock(self):
1619
+ """Mark tests that use threading and mock at the same time - stability
1620
+ issues have been observed with coverage
1621
+
1622
+ """
1623
+ return exclusions.skip_if(
1624
+ lambda config: config.options.has_coverage,
1625
+ "Stability issues with coverage",
1626
+ )
1627
+
1628
+ @property
1629
+ def sqlalchemy2_stubs(self):
1630
+ def check(config):
1631
+ try:
1632
+ __import__("sqlalchemy-stubs.ext.mypy")
1633
+ except ImportError:
1634
+ return False
1635
+ else:
1636
+ return True
1637
+
1638
+ return exclusions.only_if(check)
1639
+
1640
+ @property
1641
+ def no_sqlalchemy2_stubs(self):
1642
+ def check(config):
1643
+ try:
1644
+ __import__("sqlalchemy-stubs.ext.mypy")
1645
+ except ImportError:
1646
+ return False
1647
+ else:
1648
+ return True
1649
+
1650
+ return exclusions.skip_if(check)
1651
+
1652
+ @property
1653
+ def python312(self):
1654
+ return exclusions.only_if(
1655
+ lambda: util.py312, "Python 3.12 or above required"
1656
+ )
1657
+
1658
+ @property
1659
+ def python314(self):
1660
+ return exclusions.only_if(
1661
+ lambda: util.py314, "Python 3.14 or above required"
1662
+ )
1663
+
1664
+ @property
1665
+ def fail_python314b1(self):
1666
+ return exclusions.fails_if(
1667
+ lambda: util.compat.py314b1, "Fails as of python 3.14.0b1"
1668
+ )
1669
+
1670
+ @property
1671
+ def not_python314(self):
1672
+ """This requirement is interim to assist with backporting of
1673
+ issue #12405.
1674
+
1675
+ SQLAlchemy 2.0 still includes the ``await_fallback()`` method that
1676
+ makes use of ``asyncio.get_event_loop_policy()``. This is removed
1677
+ in SQLAlchemy 2.1.
1678
+
1679
+ """
1680
+ return exclusions.skip_if(
1681
+ lambda: util.py314, "Python 3.14 or above not supported"
1682
+ )
1683
+
1684
+ @property
1685
+ def pep649(self):
1686
+ """pep649 deferred evaluation of annotations without future mode"""
1687
+ return self.python314
1688
+
1689
+ @property
1690
+ def cpython(self):
1691
+ return exclusions.only_if(
1692
+ lambda: util.cpython, "cPython interpreter needed"
1693
+ )
1694
+
1695
+ @property
1696
+ def gil_enabled(self):
1697
+ return exclusions.only_if(
1698
+ lambda: not util.freethreading, "GIL-enabled build needed"
1699
+ )
1700
+
1701
+ @property
1702
+ def is64bit(self):
1703
+ return exclusions.only_if(lambda: util.is64bit, "64bit required")
1704
+
1705
+ @property
1706
+ def patch_library(self):
1707
+ def check_lib():
1708
+ try:
1709
+ __import__("patch")
1710
+ except ImportError:
1711
+ return False
1712
+ else:
1713
+ return True
1714
+
1715
+ return exclusions.only_if(check_lib, "patch library needed")
1716
+
1717
+ @property
1718
+ def predictable_gc(self):
1719
+ """target platform must remove all cycles unconditionally when
1720
+ gc.collect() is called, as well as clean out unreferenced subclasses.
1721
+
1722
+ """
1723
+ return self.cpython + self.gil_enabled
1724
+
1725
+ @property
1726
+ def no_coverage(self):
1727
+ """Test should be skipped if coverage is enabled.
1728
+
1729
+ This is to block tests that exercise libraries that seem to be
1730
+ sensitive to coverage, such as PostgreSQL notice logging.
1731
+
1732
+ """
1733
+ return exclusions.skip_if(
1734
+ lambda config: config.options.has_coverage,
1735
+ "Issues observed when coverage is enabled",
1736
+ )
1737
+
1738
+ def _has_mysql_on_windows(self, config):
1739
+ return False
1740
+
1741
+ def _has_mysql_fully_case_sensitive(self, config):
1742
+ return False
1743
+
1744
+ @property
1745
+ def sqlite(self):
1746
+ return exclusions.skip_if(lambda: not self._has_sqlite())
1747
+
1748
+ @property
1749
+ def cextensions(self):
1750
+ return exclusions.skip_if(
1751
+ lambda: not util.has_compiled_ext(),
1752
+ "Cython extensions not installed",
1753
+ )
1754
+
1755
+ def _has_sqlite(self):
1756
+ from sqlalchemy import create_engine
1757
+
1758
+ try:
1759
+ create_engine("sqlite://")
1760
+ return True
1761
+ except ImportError:
1762
+ return False
1763
+
1764
+ @property
1765
+ def async_dialect(self):
1766
+ """dialect makes use of await_() to invoke operations on the
1767
+ DBAPI."""
1768
+
1769
+ return exclusions.closed()
1770
+
1771
+ @property
1772
+ def asyncio(self):
1773
+ return self.greenlet
1774
+
1775
+ @property
1776
+ def no_greenlet(self):
1777
+ def go(config):
1778
+ try:
1779
+ import greenlet # noqa: F401
1780
+ except ImportError:
1781
+ return True
1782
+ else:
1783
+ return False
1784
+
1785
+ return exclusions.only_if(go)
1786
+
1787
+ @property
1788
+ def greenlet(self):
1789
+ def go(config):
1790
+ if not _test_asyncio.ENABLE_ASYNCIO:
1791
+ return False
1792
+
1793
+ try:
1794
+ import greenlet # noqa: F401
1795
+ except ImportError:
1796
+ return False
1797
+ else:
1798
+ return True
1799
+
1800
+ return exclusions.only_if(go)
1801
+
1802
+ @property
1803
+ def computed_columns(self):
1804
+ "Supports computed columns"
1805
+ return exclusions.closed()
1806
+
1807
+ @property
1808
+ def computed_columns_stored(self):
1809
+ "Supports computed columns with `persisted=True`"
1810
+ return exclusions.closed()
1811
+
1812
+ @property
1813
+ def computed_columns_virtual(self):
1814
+ "Supports computed columns with `persisted=False`"
1815
+ return exclusions.closed()
1816
+
1817
+ @property
1818
+ def computed_columns_default_persisted(self):
1819
+ """If the default persistence is virtual or stored when `persisted`
1820
+ is omitted"""
1821
+ return exclusions.closed()
1822
+
1823
+ @property
1824
+ def computed_columns_reflect_persisted(self):
1825
+ """If persistence information is returned by the reflection of
1826
+ computed columns"""
1827
+ return exclusions.closed()
1828
+
1829
+ @property
1830
+ def supports_distinct_on(self):
1831
+ """If a backend supports the DISTINCT ON in a select"""
1832
+ return exclusions.closed()
1833
+
1834
+ @property
1835
+ def supports_is_distinct_from(self):
1836
+ """Supports some form of "x IS [NOT] DISTINCT FROM y" construct.
1837
+ Different dialects will implement their own flavour, e.g.,
1838
+ sqlite will emit "x IS NOT y" instead of "x IS DISTINCT FROM y".
1839
+
1840
+ .. seealso::
1841
+
1842
+ :meth:`.ColumnOperators.is_distinct_from`
1843
+
1844
+ """
1845
+ return exclusions.skip_if(
1846
+ lambda config: not config.db.dialect.supports_is_distinct_from,
1847
+ "driver doesn't support an IS DISTINCT FROM construct",
1848
+ )
1849
+
1850
+ @property
1851
+ def identity_columns(self):
1852
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1853
+ AS IDENTITY"""
1854
+ return exclusions.closed()
1855
+
1856
+ @property
1857
+ def identity_columns_standard(self):
1858
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1859
+ AS IDENTITY with a standard syntax.
1860
+ This is mainly to exclude MSSql.
1861
+ """
1862
+ return exclusions.closed()
1863
+
1864
+ @property
1865
+ def regexp_match(self):
1866
+ """backend supports the regexp_match operator."""
1867
+ return exclusions.closed()
1868
+
1869
+ @property
1870
+ def regexp_replace(self):
1871
+ """backend supports the regexp_replace operator."""
1872
+ return exclusions.closed()
1873
+
1874
+ @property
1875
+ def fetch_first(self):
1876
+ """backend supports the fetch first clause."""
1877
+ return exclusions.closed()
1878
+
1879
+ @property
1880
+ def fetch_percent(self):
1881
+ """backend supports the fetch first clause with percent."""
1882
+ return exclusions.closed()
1883
+
1884
+ @property
1885
+ def fetch_ties(self):
1886
+ """backend supports the fetch first clause with ties."""
1887
+ return exclusions.closed()
1888
+
1889
+ @property
1890
+ def fetch_no_order_by(self):
1891
+ """backend supports the fetch first without order by"""
1892
+ return exclusions.closed()
1893
+
1894
+ @property
1895
+ def fetch_offset_with_options(self):
1896
+ """backend supports the offset when using fetch first with percent
1897
+ or ties. basically this is "not mssql"
1898
+ """
1899
+ return exclusions.closed()
1900
+
1901
+ @property
1902
+ def fetch_expression(self):
1903
+ """backend supports fetch / offset with expression in them, like
1904
+
1905
+ SELECT * FROM some_table
1906
+ OFFSET 1 + 1 ROWS FETCH FIRST 1 + 1 ROWS ONLY
1907
+ """
1908
+ return exclusions.closed()
1909
+
1910
+ @property
1911
+ def autoincrement_without_sequence(self):
1912
+ """If autoincrement=True on a column does not require an explicit
1913
+ sequence. This should be false only for oracle.
1914
+ """
1915
+ return exclusions.open()
1916
+
1917
+ @property
1918
+ def generic_classes(self):
1919
+ "If X[Y] can be implemented with ``__class_getitem__``. py3.7+"
1920
+ return exclusions.open()
1921
+
1922
+ @property
1923
+ def json_deserializer_binary(self):
1924
+ "indicates if the json_deserializer function is called with bytes"
1925
+ return exclusions.closed()
1926
+
1927
+ @property
1928
+ def reflect_table_options(self):
1929
+ """Target database must support reflecting table_options."""
1930
+ return exclusions.closed()
1931
+
1932
+ @property
1933
+ def materialized_views(self):
1934
+ """Target database must support MATERIALIZED VIEWs."""
1935
+ return exclusions.closed()
1936
+
1937
+ @property
1938
+ def materialized_views_reflect_pk(self):
1939
+ """Target database reflect MATERIALIZED VIEWs pks."""
1940
+ return exclusions.closed()
1941
+
1942
+ @property
1943
+ def supports_bitwise_or(self):
1944
+ """Target database supports bitwise or"""
1945
+ return exclusions.closed()
1946
+
1947
+ @property
1948
+ def supports_bitwise_and(self):
1949
+ """Target database supports bitwise and"""
1950
+ return exclusions.closed()
1951
+
1952
+ @property
1953
+ def supports_bitwise_not(self):
1954
+ """Target database supports bitwise not"""
1955
+ return exclusions.closed()
1956
+
1957
+ @property
1958
+ def supports_bitwise_xor(self):
1959
+ """Target database supports bitwise xor"""
1960
+ return exclusions.closed()
1961
+
1962
+ @property
1963
+ def supports_bitwise_shift(self):
1964
+ """Target database supports bitwise left or right shift"""
1965
+ return exclusions.closed()
1966
+
1967
+ @property
1968
+ def like_escapes(self):
1969
+ """Target backend supports custom ESCAPE characters
1970
+ with LIKE comparisons"""
1971
+ return exclusions.open()