Skip to content

Commit 19ccbc5

Browse files
committed
Enable compilation query cache
1 parent 48cc1c2 commit 19ccbc5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ydb_sqlalchemy/sqlalchemy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ class YqlDialect(StrCompileDialect):
564564
supports_alter = False
565565
max_identifier_length = 63
566566
supports_sane_rowcount = False
567-
supports_statement_cache = False
567+
supports_statement_cache = True
568568

569569
supports_native_enum = False
570570
supports_native_boolean = True
@@ -829,7 +829,7 @@ def do_execute(
829829
class AsyncYqlDialect(YqlDialect):
830830
driver = "ydb_async"
831831
is_async = True
832-
supports_statement_cache = False
832+
supports_statement_cache = True
833833

834834
def connect(self, *cargs, **cparams):
835835
return self.loaded_dbapi.async_connect(*cargs, **cparams)

ydb_sqlalchemy/sqlalchemy/dml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Upsert(sa.sql.Insert):
55
__visit_name__ = "upsert"
66
_propagate_attrs = {"compile_state_plugin": "yql"}
77
stringify_dialect = "yql"
8+
inherit_cache = False
89

910

1011
@sa.sql.base.CompileState.plugin_for("yql", "upsert")

0 commit comments

Comments
 (0)