ydb-sqlalchemy 0.1.7__tar.gz → 0.1.9__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.7/ydb_sqlalchemy.egg-info → ydb_sqlalchemy-0.1.9}/PKG-INFO +12 -2
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/README.md +10 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/requirements.txt +1 -1
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/setup.py +1 -1
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/test_suite.py +23 -0
- ydb_sqlalchemy-0.1.9/ydb_sqlalchemy/_version.py +1 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/compiler/base.py +4 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/dbapi_adapter.py +1 -1
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9/ydb_sqlalchemy.egg-info}/PKG-INFO +12 -2
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy.egg-info/requires.txt +1 -1
- ydb_sqlalchemy-0.1.7/ydb_sqlalchemy/_version.py +0 -1
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/LICENSE +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/MANIFEST.in +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/pyproject.toml +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/setup.cfg +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/conftest.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/test_core.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/test_inspect.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/test/test_orm.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/compiler/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/compiler/sa14.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/compiler/sa20.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/datetime_types.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/dml.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/json.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/requirements.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy/sqlalchemy/types.py +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy.egg-info/SOURCES.txt +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy.egg-info/dependency_links.txt +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy.egg-info/entry_points.txt +0 -0
- {ydb_sqlalchemy-0.1.7 → ydb_sqlalchemy-0.1.9}/ydb_sqlalchemy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ydb-sqlalchemy
|
|
3
|
-
Version: 0.1.
|
|
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
|
|
@@ -14,13 +14,14 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: sqlalchemy<3.0.0,>=1.4.0
|
|
16
16
|
Requires-Dist: ydb>=3.18.8
|
|
17
|
-
Requires-Dist: ydb-dbapi>=0.1.
|
|
17
|
+
Requires-Dist: ydb-dbapi>=0.1.10
|
|
18
18
|
Provides-Extra: yc
|
|
19
19
|
Requires-Dist: yandexcloud; extra == "yc"
|
|
20
20
|
|
|
21
21
|
# YDB Dialect for SQLAlchemy
|
|
22
22
|
---
|
|
23
23
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/blob/main/LICENSE)
|
|
24
|
+
[](https://badge.fury.io/py/ydb-sqlalchemy)
|
|
24
25
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/tests.yml)
|
|
25
26
|
[](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
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# YDB Dialect for SQLAlchemy
|
|
2
2
|
---
|
|
3
3
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/blob/main/LICENSE)
|
|
4
|
+
[](https://badge.fury.io/py/ydb-sqlalchemy)
|
|
4
5
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/tests.yml)
|
|
5
6
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/style.yml)
|
|
6
7
|
|
|
@@ -10,6 +11,15 @@ This repository contains YQL dialect for SqlAlchemy 2.0.
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
## Installation
|
|
14
|
+
|
|
15
|
+
### Via PyPI
|
|
16
|
+
To install ydb-sqlalchemy from PyPI:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
$ pip install ydb-sqlalchemy
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Installation from source code
|
|
13
23
|
To work with current ydb-sqlalchemy version clone this repo and run from source root:
|
|
14
24
|
|
|
15
25
|
```bash
|
|
@@ -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.9", # AUTOVERSION
|
|
17
17
|
description="YDB Dialect for SQLAlchemy",
|
|
18
18
|
author="Yandex LLC",
|
|
19
19
|
author_email="ydb@yandex-team.ru",
|
|
@@ -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
|
|
|
@@ -0,0 +1 @@
|
|
|
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.
|
|
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
|
|
@@ -14,13 +14,14 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: sqlalchemy<3.0.0,>=1.4.0
|
|
16
16
|
Requires-Dist: ydb>=3.18.8
|
|
17
|
-
Requires-Dist: ydb-dbapi>=0.1.
|
|
17
|
+
Requires-Dist: ydb-dbapi>=0.1.10
|
|
18
18
|
Provides-Extra: yc
|
|
19
19
|
Requires-Dist: yandexcloud; extra == "yc"
|
|
20
20
|
|
|
21
21
|
# YDB Dialect for SQLAlchemy
|
|
22
22
|
---
|
|
23
23
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/blob/main/LICENSE)
|
|
24
|
+
[](https://badge.fury.io/py/ydb-sqlalchemy)
|
|
24
25
|
[](https://github.com/ydb-platform/ydb-sqlalchemy/actions/workflows/tests.yml)
|
|
25
26
|
[](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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.1.7"
|
|
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.7 → ydb_sqlalchemy-0.1.9}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|