ydb-sqlalchemy 0.1.12__py2.py3-none-any.whl → 0.1.13__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
test/test_suite.py CHANGED
@@ -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
@@ -1 +1 @@
1
- VERSION = "0.1.12"
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():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ydb-sqlalchemy
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: YDB Dialect for SQLAlchemy
5
5
  Home-page: http://github.com/ydb-platform/ydb-sqlalchemy
6
6
  Author: Yandex LLC
@@ -3,9 +3,9 @@ test/conftest.py,sha256=rhWa0EQB9EwO_wAwxPdK17Qi582DdbBE8p5Gv4180Ds,570
3
3
  test/test_core.py,sha256=XvPJ0MtWK2gqGytps4YMUpHtJWKlEqN1rQBUpeeelAg,42859
4
4
  test/test_inspect.py,sha256=c4kc3jc48MCOfllO-ciiYf1vO-HOfuv0xVoXYT1Jxro,1106
5
5
  test/test_orm.py,sha256=jQVVld50zbUwxwgW9ySIWGaNDEOLzHKXjTkdpsG9TpA,1825
6
- test/test_suite.py,sha256=XIW5kxJNKGK4FKE_nza-379_OFOwhP8zcsXEC0lPqWY,30569
6
+ test/test_suite.py,sha256=3Ht_mEG5zzYUA_7YH3Hax5EZgnGhnPrN0PBuJZvdR9I,31104
7
7
  ydb_sqlalchemy/__init__.py,sha256=hX7Gy-KOiHk7B5-0wj3ZmLjk4YDJnSMHIAqxVGn_PJY,181
8
- ydb_sqlalchemy/_version.py,sha256=X3J9304PBLJ6R-wpcwP3ozcXPbjz_z8dBOeUAG5u9Ck,19
8
+ ydb_sqlalchemy/_version.py,sha256=0BcN8aokkqZB9wuqna4wlHYj0D056RAOE21Mz-Y_m_E,19
9
9
  ydb_sqlalchemy/sqlalchemy/__init__.py,sha256=YAj29mdu0GEG0Udoo0p5ANmEyH6OsAKz5FZc0qn6FDY,16570
10
10
  ydb_sqlalchemy/sqlalchemy/datetime_types.py,sha256=wrI9kpsI_f7Jhbm7Fu0o_S1QoGCLIe6A9jfUwb41aMM,1929
11
11
  ydb_sqlalchemy/sqlalchemy/dbapi_adapter.py,sha256=AH-M0a3dI4A20xrkUMWeZ9QLKqa1GcEioclt9BDGNGI,3297
@@ -15,12 +15,12 @@ ydb_sqlalchemy/sqlalchemy/requirements.py,sha256=zm6fcLormtk3KHnbtrBvxfkbG9ZyzNa
15
15
  ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py,sha256=QPRgUPsTOqAf0gzWjidsIhTPVkfOILy4SCSgNb1GE7o,1039
16
16
  ydb_sqlalchemy/sqlalchemy/types.py,sha256=BVeC8RSa2nFnI3-Q7XZxCnAolHc_k_kMCfWhUmbi5wo,3823
17
17
  ydb_sqlalchemy/sqlalchemy/compiler/__init__.py,sha256=QqA6r-_bw1R97nQZy5ZSJN724znXg88l4mi5PpqAOxI,492
18
- ydb_sqlalchemy/sqlalchemy/compiler/base.py,sha256=FKtVDKl33hGLcIKpV0UR2ppQ-X2XJ5oyh10FXw4I2uY,19220
18
+ ydb_sqlalchemy/sqlalchemy/compiler/base.py,sha256=zbd9uhV0uxHfMkSTyi4eoZiaiS32yNid4IWfGUo82vA,19433
19
19
  ydb_sqlalchemy/sqlalchemy/compiler/sa14.py,sha256=LanxAnwOiMnsnrY05B0jpmvGn5NXuOKMcxi_6N3obVM,1186
20
20
  ydb_sqlalchemy/sqlalchemy/compiler/sa20.py,sha256=rvVhe-pq5bOyuW4KMMMAD7JIWMzy355eijymBvuPwKw,3421
21
- ydb_sqlalchemy-0.1.12.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
- ydb_sqlalchemy-0.1.12.dist-info/METADATA,sha256=h7iI-uXVTgP0klREGvPKqbMj8HOwrRj4UONls6Xtr5I,5395
23
- ydb_sqlalchemy-0.1.12.dist-info/WHEEL,sha256=Ll72iyqtt6Rbxp-Q7FSafYA1LeRv98X15xcZWRsFEmY,109
24
- ydb_sqlalchemy-0.1.12.dist-info/entry_points.txt,sha256=iJxbKYuliWNBmL0iIiw8MxvOXrSEz5xe5fuEBqMRwCE,267
25
- ydb_sqlalchemy-0.1.12.dist-info/top_level.txt,sha256=iS69Y1GTAcTok0u0oQdxP-Q5iVgUGI71XBsaEUrWhMg,20
26
- ydb_sqlalchemy-0.1.12.dist-info/RECORD,,
21
+ ydb_sqlalchemy-0.1.13.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ ydb_sqlalchemy-0.1.13.dist-info/METADATA,sha256=Ci_vcXwlXZx21QzRfA1Q9DL8lVXRvf2ngd9l7IVdbWM,5395
23
+ ydb_sqlalchemy-0.1.13.dist-info/WHEEL,sha256=Ll72iyqtt6Rbxp-Q7FSafYA1LeRv98X15xcZWRsFEmY,109
24
+ ydb_sqlalchemy-0.1.13.dist-info/entry_points.txt,sha256=iJxbKYuliWNBmL0iIiw8MxvOXrSEz5xe5fuEBqMRwCE,267
25
+ ydb_sqlalchemy-0.1.13.dist-info/top_level.txt,sha256=iS69Y1GTAcTok0u0oQdxP-Q5iVgUGI71XBsaEUrWhMg,20
26
+ ydb_sqlalchemy-0.1.13.dist-info/RECORD,,