summaryrefslogtreecommitdiffstats
path: root/sqlglot/__init__.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-22 18:53:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-22 18:53:34 +0000
commit8f88a01462641cbf930b3c43b780565d0fb7d37e (patch)
treee211588c29e6ce6d16fbbfd33d8cda63237c2e6e /sqlglot/__init__.py
parentReleasing debian version 16.2.1-1. (diff)
downloadsqlglot-8f88a01462641cbf930b3c43b780565d0fb7d37e.tar.xz
sqlglot-8f88a01462641cbf930b3c43b780565d0fb7d37e.zip
Merging upstream version 16.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/__init__.py')
-rw-r--r--sqlglot/__init__.py47
1 files changed, 3 insertions, 44 deletions
diff --git a/sqlglot/__init__.py b/sqlglot/__init__.py
index 8fb623a..739ec29 100644
--- a/sqlglot/__init__.py
+++ b/sqlglot/__init__.py
@@ -84,58 +84,17 @@ def parse(sql: str, read: DialectType = None, **opts) -> t.List[t.Optional[Expre
@t.overload
-def parse_one(
- sql: str,
- read: None = None,
- into: t.Type[E] = ...,
- **opts,
-) -> E:
+def parse_one(sql: str, *, into: t.Type[E], **opts) -> E:
...
@t.overload
-def parse_one(
- sql: str,
- read: DialectType,
- into: t.Type[E],
- **opts,
-) -> E:
+def parse_one(sql: str, **opts) -> Expression:
...
-@t.overload
def parse_one(
- sql: str,
- read: None = None,
- into: t.Union[str, t.Collection[t.Union[str, t.Type[Expression]]]] = ...,
- **opts,
-) -> Expression:
- ...
-
-
-@t.overload
-def parse_one(
- sql: str,
- read: DialectType,
- into: t.Union[str, t.Collection[t.Union[str, t.Type[Expression]]]],
- **opts,
-) -> Expression:
- ...
-
-
-@t.overload
-def parse_one(
- sql: str,
- **opts,
-) -> Expression:
- ...
-
-
-def parse_one(
- sql: str,
- read: DialectType = None,
- into: t.Optional[exp.IntoType] = None,
- **opts,
+ sql: str, read: DialectType = None, into: t.Optional[exp.IntoType] = None, **opts
) -> Expression:
"""
Parses the given SQL string and returns a syntax tree for the first parsed SQL statement.