ydb-sqlalchemy 0.1.8__py2.py3-none-any.whl → 0.1.9__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
@@ -546,6 +546,29 @@ class ContainerTypesTest(fixtures.TablesTest):
546
546
  eq_(connection.execute(sa.select(table)).fetchall(), [(1,), (2,), (3,)])
547
547
 
548
548
 
549
+ class ConcatTest(fixtures.TablesTest):
550
+ @classmethod
551
+ def define_tables(cls, metadata):
552
+ Table(
553
+ "concat_func_test",
554
+ metadata,
555
+ Column("A", String),
556
+ Column("B", String),
557
+ sa.PrimaryKeyConstraint("A"),
558
+ schema=None,
559
+ test_needs_fk=True,
560
+ )
561
+
562
+ def test_concat_func(self, connection):
563
+ table = self.tables.concat_func_test
564
+
565
+ connection.execute(sa.insert(table).values([{"A": "A", "B": "B"}]))
566
+
567
+ stmt = select(func.concat(table.c.A, " ", table.c.B)).limit(1)
568
+
569
+ eq_(connection.scalar(stmt), "A B")
570
+
571
+
549
572
  if not OLD_SA:
550
573
  from sqlalchemy.testing.suite.test_types import NativeUUIDTest as _NativeUUIDTest
551
574
 
@@ -1 +1 @@
1
- VERSION = "0.1.8"
1
+ VERSION = "0.1.9"
@@ -307,6 +307,10 @@ class BaseYqlCompiler(StrSQLCompiler):
307
307
  + [name]
308
308
  ) % {"expr": self.function_argspec(func, **kwargs)}
309
309
 
310
+ def visit_concat_func(self, func, **kwargs):
311
+ arg_sql = " || ".join(self.process(arg, **kwargs) for arg in func.clauses)
312
+ return arg_sql
313
+
310
314
  def _is_bound_to_nullable_column(self, bind_name: str) -> bool:
311
315
  if bind_name in self.column_keys and hasattr(self.compile_state, "dml_table"):
312
316
  if bind_name in self.compile_state.dml_table.c:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ydb-sqlalchemy
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: YDB Dialect for SQLAlchemy
5
5
  Home-page: http://github.com/ydb-platform/ydb-sqlalchemy
6
6
  Author: Yandex LLC
@@ -21,6 +21,7 @@ Requires-Dist: yandexcloud ; extra == 'yc'
21
21
  # YDB Dialect for SQLAlchemy
22
22
  ---
23
23
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/ydb-platform/ydb-sqlalchemy/blob/main/LICENSE)
24
+ [![PyPI version](https://badge.fury.io/py/ydb-sqlalchemy.svg)](https://badge.fury.io/py/ydb-sqlalchemy)
24
25
  [![Functional tests](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/tests.yml/badge.svg)](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/tests.yml)
25
26
  [![Style checks](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/style.yml/badge.svg)](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/style.yml)
26
27
 
@@ -30,6 +31,15 @@ This repository contains YQL dialect for SqlAlchemy 2.0.
30
31
 
31
32
 
32
33
  ## Installation
34
+
35
+ ### Via PyPI
36
+ To install ydb-sqlalchemy from PyPI:
37
+
38
+ ```bash
39
+ $ pip install ydb-sqlalchemy
40
+ ```
41
+
42
+ ### Installation from source code
33
43
  To work with current ydb-sqlalchemy version clone this repo and run from source root:
34
44
 
35
45
  ```bash
@@ -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=ZnN9eQKiHgtNQeojC82LkncKmvRS2yFsUWy9GiKdVn4,18944
6
+ test/test_suite.py,sha256=peBlmjGpdvhkGQM0w0ulBtX2U-7V-nqqeQmm2RgAH7w,19568
7
7
  ydb_sqlalchemy/__init__.py,sha256=hX7Gy-KOiHk7B5-0wj3ZmLjk4YDJnSMHIAqxVGn_PJY,181
8
- ydb_sqlalchemy/_version.py,sha256=x251-fbcn8rATkvSMLIBz6j535zTcLDxgDQ9A0Ypgyw,18
8
+ ydb_sqlalchemy/_version.py,sha256=V3G9KvW0YJgXF7ujb-Y3MU9L6nKQa_pL4l-az9Fly0w,18
9
9
  ydb_sqlalchemy/sqlalchemy/__init__.py,sha256=GXkc4N-margcHMdZc1_xeB748y0SX2gDzgbGQONu1H4,16356
10
10
  ydb_sqlalchemy/sqlalchemy/datetime_types.py,sha256=MlH4YGlNeo0YihHX8ZiSIEkPdyRVL2QWP0wj-uxqzTI,914
11
11
  ydb_sqlalchemy/sqlalchemy/dbapi_adapter.py,sha256=HsO4Vhv2nj_Qowt23mUH-jRuNdWKV3ryKnZG5OFp5m0,3109
@@ -15,12 +15,12 @@ ydb_sqlalchemy/sqlalchemy/requirements.py,sha256=zm6fcLormtk3KHnbtrBvxfkbG9ZyzNa
15
15
  ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py,sha256=HSNDtmqYXf5aR1hDtzioQV9YzHALK7NPerFxZRWn7hk,782
16
16
  ydb_sqlalchemy/sqlalchemy/types.py,sha256=sTL3VCMs-UvYONZfheYgSVOyPd4udVYOMz4A6BtauUw,1694
17
17
  ydb_sqlalchemy/sqlalchemy/compiler/__init__.py,sha256=QqA6r-_bw1R97nQZy5ZSJN724znXg88l4mi5PpqAOxI,492
18
- ydb_sqlalchemy/sqlalchemy/compiler/base.py,sha256=hMPaX0U8P8UwJF2ZV4YFDgdSrXtMHk62zc8QPa7ZIbM,18222
18
+ ydb_sqlalchemy/sqlalchemy/compiler/base.py,sha256=BfaK1J-wBkixKuH1944b0dfDrZ1D4xWU9WmHDy3KM94,18378
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.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
- ydb_sqlalchemy-0.1.8.dist-info/METADATA,sha256=DmQBkoVheKE49IuhX8VsuiFwp994bsA3yzwYA46PyF0,2490
23
- ydb_sqlalchemy-0.1.8.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
24
- ydb_sqlalchemy-0.1.8.dist-info/entry_points.txt,sha256=iJxbKYuliWNBmL0iIiw8MxvOXrSEz5xe5fuEBqMRwCE,267
25
- ydb_sqlalchemy-0.1.8.dist-info/top_level.txt,sha256=iS69Y1GTAcTok0u0oQdxP-Q5iVgUGI71XBsaEUrWhMg,20
26
- ydb_sqlalchemy-0.1.8.dist-info/RECORD,,
21
+ ydb_sqlalchemy-0.1.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ ydb_sqlalchemy-0.1.9.dist-info/METADATA,sha256=PFa6IKaOU1Q1rCSsiDk7joOJxPf5Bp4R8yIZJukBh_k,2722
23
+ ydb_sqlalchemy-0.1.9.dist-info/WHEEL,sha256=Ll72iyqtt6Rbxp-Q7FSafYA1LeRv98X15xcZWRsFEmY,109
24
+ ydb_sqlalchemy-0.1.9.dist-info/entry_points.txt,sha256=iJxbKYuliWNBmL0iIiw8MxvOXrSEz5xe5fuEBqMRwCE,267
25
+ ydb_sqlalchemy-0.1.9.dist-info/top_level.txt,sha256=iS69Y1GTAcTok0u0oQdxP-Q5iVgUGI71XBsaEUrWhMg,20
26
+ ydb_sqlalchemy-0.1.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any