diff options
author | shashkin <shashkin@yandex-team.com> | 2022-09-11 21:06:48 +0300 |
---|---|---|
committer | shashkin <shashkin@yandex-team.com> | 2022-09-11 21:06:48 +0300 |
commit | e4be6ca62cb9b326805f3ef78f073f48b51e69d7 (patch) | |
tree | f449f05d59f8c493cfa55881ffbd41468e53c46b | |
parent | f6f95427f2d96542fe7333fb9e7a44d0f4b3e595 (diff) | |
download | ydb-e4be6ca62cb9b326805f3ef78f073f48b51e69d7.tar.gz |
Avoid double-quoting of identifiers
-rw-r--r-- | ydb/public/sdk/python/ydb/sqlalchemy/__init__.py | 6 |
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): |