ydb-sqlalchemy 0.1.11__tar.gz → 0.1.13__tar.gz
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.
- {ydb_sqlalchemy-0.1.11/ydb_sqlalchemy.egg-info → ydb_sqlalchemy-0.1.13}/PKG-INFO +1 -1
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/setup.py +1 -1
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/test_suite.py +13 -0
- ydb_sqlalchemy-0.1.13/ydb_sqlalchemy/_version.py +1 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/compiler/base.py +4 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/dbapi_adapter.py +6 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13/ydb_sqlalchemy.egg-info}/PKG-INFO +1 -1
- ydb_sqlalchemy-0.1.11/ydb_sqlalchemy/_version.py +0 -1
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/LICENSE +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/MANIFEST.in +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/README.md +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/pyproject.toml +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/requirements.txt +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/setup.cfg +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/conftest.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/test_core.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/test_inspect.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/test/test_orm.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/compiler/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/compiler/sa14.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/compiler/sa20.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/datetime_types.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/dml.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/json.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/requirements.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/types.py +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/SOURCES.txt +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/dependency_links.txt +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/entry_points.txt +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/requires.txt +0 -0
- {ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/top_level.txt +0 -0
|
@@ -13,7 +13,7 @@ with open("requirements.txt") as f:
|
|
|
13
13
|
|
|
14
14
|
setuptools.setup(
|
|
15
15
|
name="ydb-sqlalchemy",
|
|
16
|
-
version="0.1.
|
|
16
|
+
version="0.1.13", # AUTOVERSION
|
|
17
17
|
description="YDB Dialect for SQLAlchemy",
|
|
18
18
|
author="Yandex LLC",
|
|
19
19
|
author_email="ydb@yandex-team.ru",
|
|
@@ -577,6 +577,19 @@ class ContainerTypesTest(fixtures.TablesTest):
|
|
|
577
577
|
|
|
578
578
|
eq_(connection.execute(sa.select(table)).fetchall(), [(1,), (2,), (3,)])
|
|
579
579
|
|
|
580
|
+
def test_tuple_list_type_bind_variable_text(self, connection):
|
|
581
|
+
table = self.tables.container_types_test
|
|
582
|
+
|
|
583
|
+
connection.execute(sa.insert(table).values([{"id": 1}, {"id": 2}, {"id": 3}]))
|
|
584
|
+
|
|
585
|
+
stmt = select(table.c.id).where(
|
|
586
|
+
sa.text("(id, id) IN :tuple_arr_var").bindparams(
|
|
587
|
+
sa.bindparam("tuple_arr_var", type_=sa.ARRAY(sa.TupleType(sa.Integer, sa.Integer))),
|
|
588
|
+
)
|
|
589
|
+
)
|
|
590
|
+
|
|
591
|
+
eq_(connection.execute(stmt, {"tuple_arr_var": [(1, 1), (2, 2)]}).fetchall(), [(1,), (2,)])
|
|
592
|
+
|
|
580
593
|
|
|
581
594
|
class ConcatTest(fixtures.TablesTest):
|
|
582
595
|
@classmethod
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.1.13"
|
|
@@ -228,6 +228,10 @@ class BaseYqlTypeCompiler(StrSQLTypeCompiler):
|
|
|
228
228
|
ydb_type = ydb.DecimalType(precision, scale)
|
|
229
229
|
elif isinstance(type_, (types.ListType, sa.ARRAY)):
|
|
230
230
|
ydb_type = ydb.ListType(self.get_ydb_type(type_.item_type, is_optional=False))
|
|
231
|
+
elif isinstance(type_, sa.TupleType):
|
|
232
|
+
ydb_type = ydb.TupleType()
|
|
233
|
+
for item_type in type_.types:
|
|
234
|
+
ydb_type.add_element(self.get_ydb_type(item_type, is_optional=False))
|
|
231
235
|
elif isinstance(type_, types.StructType):
|
|
232
236
|
ydb_type = ydb.StructType()
|
|
233
237
|
for field, field_type in type_.fields_types.items():
|
|
@@ -66,7 +66,10 @@ class AdaptedAsyncConnection(AdaptedConnection):
|
|
|
66
66
|
return await_only(self._connection.get_table_names())
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
# TODO(vgvoleg): Migrate to AsyncAdapt_dbapi_cursor and AsyncAdapt_dbapi_connection
|
|
69
70
|
class AdaptedAsyncCursor:
|
|
71
|
+
_awaitable_cursor_close: bool = False
|
|
72
|
+
|
|
70
73
|
def __init__(self, cursor: AsyncCursor):
|
|
71
74
|
self._cursor = cursor
|
|
72
75
|
|
|
@@ -112,3 +115,6 @@ class AdaptedAsyncCursor:
|
|
|
112
115
|
|
|
113
116
|
def setoutputsizes(self, *args):
|
|
114
117
|
pass
|
|
118
|
+
|
|
119
|
+
async def _async_soft_close(self) -> None:
|
|
120
|
+
pass
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.1.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/compiler/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ydb_sqlalchemy-0.1.11 → ydb_sqlalchemy-0.1.13}/ydb_sqlalchemy.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|