aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshashkin <shashkin@yandex-team.com>2022-09-11 21:06:48 +0300
committershashkin <shashkin@yandex-team.com>2022-09-11 21:06:48 +0300
commite4be6ca62cb9b326805f3ef78f073f48b51e69d7 (patch)
treef449f05d59f8c493cfa55881ffbd41468e53c46b
parentf6f95427f2d96542fe7333fb9e7a44d0f4b3e595 (diff)
downloadydb-e4be6ca62cb9b326805f3ef78f073f48b51e69d7.tar.gz
Avoid double-quoting of identifiers
-rw-r--r--ydb/public/sdk/python/ydb/sqlalchemy/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ydb/public/sdk/python/ydb/sqlalchemy/__init__.py b/ydb/public/sdk/python/ydb/sqlalchemy/__init__.py
index 7815a28df2..eaf63a31f9 100644
--- a/ydb/public/sdk/python/ydb/sqlalchemy/__init__.py
+++ b/ydb/public/sdk/python/ydb/sqlalchemy/__init__.py
@@ -36,9 +36,9 @@ try:
final_quote="`",
)
- def _requires_quotes(self, *args, **kwargs):
- # Force all identifiers to get quoted.
- return True
+ def _requires_quotes(self, value):
+ # Force all identifiers to get quoted unless already quoted.
+ return not (value.startswith(self.initial_quote) and value.endswith(self.final_quote))
class YqlTypeCompiler(GenericTypeCompiler):
def visit_VARCHAR(self, type_, **kw):