ydb-sqlalchemy 0.1.5__tar.gz → 0.1.8__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.5/ydb_sqlalchemy.egg-info → ydb_sqlalchemy-0.1.8}/PKG-INFO +2 -2
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/requirements.txt +1 -1
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/setup.py +1 -1
- ydb_sqlalchemy-0.1.8/ydb_sqlalchemy/_version.py +1 -0
- ydb_sqlalchemy-0.1.8/ydb_sqlalchemy/sqlalchemy/compiler/sa14.py +45 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/dbapi_adapter.py +4 -4
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8/ydb_sqlalchemy.egg-info}/PKG-INFO +2 -2
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy.egg-info/requires.txt +1 -1
- ydb_sqlalchemy-0.1.5/ydb_sqlalchemy/_version.py +0 -1
- ydb_sqlalchemy-0.1.5/ydb_sqlalchemy/sqlalchemy/compiler/sa14.py +0 -25
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/LICENSE +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/MANIFEST.in +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/README.md +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/pyproject.toml +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/setup.cfg +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/conftest.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/test_core.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/test_inspect.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/test_orm.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/test/test_suite.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/compiler/__init__.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/compiler/base.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/compiler/sa20.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/datetime_types.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/dml.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/json.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/requirements.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/test_sqlalchemy.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy/sqlalchemy/types.py +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy.egg-info/SOURCES.txt +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy.egg-info/dependency_links.txt +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/ydb_sqlalchemy.egg-info/entry_points.txt +0 -0
- {ydb_sqlalchemy-0.1.5 → ydb_sqlalchemy-0.1.8}/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.8
|
|
4
4
|
Summary: YDB Dialect for SQLAlchemy
|
|
5
5
|
Home-page: http://github.com/ydb-platform/ydb-sqlalchemy
|
|
6
6
|
Author: Yandex LLC
|
|
@@ -14,7 +14,7 @@ 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
|
|
|
@@ -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.8", # AUTOVERSION
|
|
17
17
|
description="YDB Dialect for SQLAlchemy",
|
|
18
18
|
author="Yandex LLC",
|
|
19
19
|
author_email="ydb@yandex-team.ru",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.1.8"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
import sqlalchemy as sa
|
|
3
|
+
import ydb
|
|
4
|
+
|
|
5
|
+
from .base import (
|
|
6
|
+
BaseYqlCompiler,
|
|
7
|
+
BaseYqlDDLCompiler,
|
|
8
|
+
BaseYqlIdentifierPreparer,
|
|
9
|
+
BaseYqlTypeCompiler,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class YqlTypeCompiler(BaseYqlTypeCompiler):
|
|
14
|
+
# We use YDB Double for sa.Float for compatibility with old dialect version
|
|
15
|
+
def visit_FLOAT(self, type_: sa.FLOAT, **kw):
|
|
16
|
+
return "DOUBLE"
|
|
17
|
+
|
|
18
|
+
def get_ydb_type(
|
|
19
|
+
self, type_: sa.types.TypeEngine, is_optional: bool
|
|
20
|
+
) -> Union[ydb.PrimitiveType, ydb.AbstractTypeBuilder]:
|
|
21
|
+
if isinstance(type_, sa.TypeDecorator):
|
|
22
|
+
type_ = type_.impl
|
|
23
|
+
|
|
24
|
+
if isinstance(type_, sa.Float):
|
|
25
|
+
ydb_type = ydb.PrimitiveType.Double
|
|
26
|
+
if is_optional:
|
|
27
|
+
return ydb.OptionalType(ydb_type)
|
|
28
|
+
return ydb_type
|
|
29
|
+
|
|
30
|
+
return super().get_ydb_type(type_, is_optional)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class YqlIdentifierPreparer(BaseYqlIdentifierPreparer):
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class YqlCompiler(BaseYqlCompiler):
|
|
38
|
+
_type_compiler_cls = YqlTypeCompiler
|
|
39
|
+
|
|
40
|
+
def visit_upsert(self, insert_stmt, **kw):
|
|
41
|
+
return self.visit_insert(insert_stmt, **kw).replace("INSERT", "UPSERT", 1)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class YqlDDLCompiler(BaseYqlDDLCompiler):
|
|
45
|
+
...
|
|
@@ -87,13 +87,13 @@ class AdaptedAsyncCursor:
|
|
|
87
87
|
return self._cursor.rowcount
|
|
88
88
|
|
|
89
89
|
def fetchone(self):
|
|
90
|
-
return
|
|
90
|
+
return self._cursor.fetchone()
|
|
91
91
|
|
|
92
92
|
def fetchmany(self, size=None):
|
|
93
|
-
return
|
|
93
|
+
return self._cursor.fetchmany(size=size)
|
|
94
94
|
|
|
95
95
|
def fetchall(self):
|
|
96
|
-
return
|
|
96
|
+
return self._cursor.fetchall()
|
|
97
97
|
|
|
98
98
|
def execute_scheme(self, sql, parameters=None):
|
|
99
99
|
return await_only(self._cursor.execute_scheme(sql, parameters))
|
|
@@ -105,7 +105,7 @@ class AdaptedAsyncCursor:
|
|
|
105
105
|
return await_only(self._cursor.executemany(sql, parameters))
|
|
106
106
|
|
|
107
107
|
def close(self):
|
|
108
|
-
return
|
|
108
|
+
return self._cursor.close()
|
|
109
109
|
|
|
110
110
|
def setinputsizes(self, *args):
|
|
111
111
|
pass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ydb-sqlalchemy
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: YDB Dialect for SQLAlchemy
|
|
5
5
|
Home-page: http://github.com/ydb-platform/ydb-sqlalchemy
|
|
6
6
|
Author: Yandex LLC
|
|
@@ -14,7 +14,7 @@ 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
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.1.5"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from .base import (
|
|
2
|
-
BaseYqlCompiler,
|
|
3
|
-
BaseYqlDDLCompiler,
|
|
4
|
-
BaseYqlIdentifierPreparer,
|
|
5
|
-
BaseYqlTypeCompiler,
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class YqlTypeCompiler(BaseYqlTypeCompiler):
|
|
10
|
-
...
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class YqlIdentifierPreparer(BaseYqlIdentifierPreparer):
|
|
14
|
-
...
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class YqlCompiler(BaseYqlCompiler):
|
|
18
|
-
_type_compiler_cls = YqlTypeCompiler
|
|
19
|
-
|
|
20
|
-
def visit_upsert(self, insert_stmt, **kw):
|
|
21
|
-
return self.visit_insert(insert_stmt, **kw).replace("INSERT", "UPSERT", 1)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class YqlDDLCompiler(BaseYqlDDLCompiler):
|
|
25
|
-
...
|
|
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.5 → ydb_sqlalchemy-0.1.8}/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
|