summaryrefslogtreecommitdiffstats
path: root/sqlglot/__init__.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-10 06:44:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-10 06:44:54 +0000
commitd2e9401b18925b5702c5c758af7d4f5b61deb493 (patch)
tree58dbf490c0457c2908751b3e4b63af13287381ee /sqlglot/__init__.py
parentAdding upstream version 11.7.1. (diff)
downloadsqlglot-d2e9401b18925b5702c5c758af7d4f5b61deb493.tar.xz
sqlglot-d2e9401b18925b5702c5c758af7d4f5b61deb493.zip
Adding upstream version 12.2.0.upstream/12.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/__init__.py')
-rw-r--r--sqlglot/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlglot/__init__.py b/sqlglot/__init__.py
index 42d89d1..f7440e0 100644
--- a/sqlglot/__init__.py
+++ b/sqlglot/__init__.py
@@ -50,7 +50,7 @@ if t.TYPE_CHECKING:
T = t.TypeVar("T", bound=Expression)
-__version__ = "11.7.1"
+__version__ = "12.2.0"
pretty = False
"""Whether to format generated SQL by default."""
@@ -181,7 +181,7 @@ def transpile(
Returns:
The list of transpiled SQL statements.
"""
- write = write or read if identity else write
+ write = (read if write is None else write) if identity else write
return [
Dialect.get_or_raise(write)().generate(expression, **opts)
for expression in parse(sql, read, error_level=error_level)