sqlglot 27.15.0__py3-none-any.whl → 27.15.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlglot/_version.py +2 -2
- sqlglot/parser.py +17 -6
- {sqlglot-27.15.0.dist-info → sqlglot-27.15.1.dist-info}/METADATA +1 -1
- {sqlglot-27.15.0.dist-info → sqlglot-27.15.1.dist-info}/RECORD +7 -7
- {sqlglot-27.15.0.dist-info → sqlglot-27.15.1.dist-info}/WHEEL +0 -0
- {sqlglot-27.15.0.dist-info → sqlglot-27.15.1.dist-info}/licenses/LICENSE +0 -0
- {sqlglot-27.15.0.dist-info → sqlglot-27.15.1.dist-info}/top_level.txt +0 -0
sqlglot/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '27.15.
|
|
32
|
-
__version_tuple__ = version_tuple = (27, 15,
|
|
31
|
+
__version__ = version = '27.15.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (27, 15, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
sqlglot/parser.py
CHANGED
|
@@ -6975,16 +6975,27 @@ class Parser(metaclass=_Parser):
|
|
|
6975
6975
|
|
|
6976
6976
|
def _parse_substring(self) -> exp.Substring:
|
|
6977
6977
|
# Postgres supports the form: substring(string [from int] [for int])
|
|
6978
|
+
# (despite being undocumented, the reverse order also works)
|
|
6978
6979
|
# https://www.postgresql.org/docs/9.1/functions-string.html @ Table 9-6
|
|
6979
6980
|
|
|
6980
6981
|
args = t.cast(t.List[t.Optional[exp.Expression]], self._parse_csv(self._parse_bitwise))
|
|
6981
6982
|
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
if
|
|
6986
|
-
|
|
6987
|
-
|
|
6983
|
+
start, length = None, None
|
|
6984
|
+
|
|
6985
|
+
while self._curr:
|
|
6986
|
+
if self._match(TokenType.FROM):
|
|
6987
|
+
start = self._parse_bitwise()
|
|
6988
|
+
elif self._match(TokenType.FOR):
|
|
6989
|
+
if not start:
|
|
6990
|
+
start = exp.Literal.number(1)
|
|
6991
|
+
length = self._parse_bitwise()
|
|
6992
|
+
else:
|
|
6993
|
+
break
|
|
6994
|
+
|
|
6995
|
+
if start:
|
|
6996
|
+
args.append(start)
|
|
6997
|
+
if length:
|
|
6998
|
+
args.append(length)
|
|
6988
6999
|
|
|
6989
7000
|
return self.validate_expression(exp.Substring.from_arg_list(args), args)
|
|
6990
7001
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
sqlglot/__init__.py,sha256=za08rtdPh2v7dOpGdNomttlIVGgTrKja7rPd6sQwaTg,5391
|
|
2
2
|
sqlglot/__main__.py,sha256=022c173KqxsiABWTEpUIq_tJUxuNiW7a7ABsxBXqvu8,2069
|
|
3
3
|
sqlglot/_typing.py,sha256=-1HPyr3w5COlSJWqlgt8jhFk2dyMvBuvVBqIX1wyVCM,642
|
|
4
|
-
sqlglot/_version.py,sha256=
|
|
4
|
+
sqlglot/_version.py,sha256=uBjOfOPRa2Q_ZQoGTa7Z6DXUQYBsQngq3pkSoTX6oxQ,708
|
|
5
5
|
sqlglot/diff.py,sha256=PtOllQMQa1Sw1-V2Y8eypmDqGujXYPaTOp_WLsWkAWk,17314
|
|
6
6
|
sqlglot/errors.py,sha256=QNKMr-pzLUDR-tuMmn_GK6iMHUIVdb_YSJ_BhGEvuso,2126
|
|
7
7
|
sqlglot/expressions.py,sha256=P9Da86Bo1Ufv1oZFs3ESJ1WDlc6tjvr-qz5BAd8_ek8,255449
|
|
@@ -9,7 +9,7 @@ sqlglot/generator.py,sha256=m4UHZpDrh52RZzv_iBqMnhv_j4DmhtpY1CtVyiGIJ8k,225187
|
|
|
9
9
|
sqlglot/helper.py,sha256=9nZjFVRBtMKFC3EdzpDQ6jkazFO19po6BF8xHiNGZIo,15111
|
|
10
10
|
sqlglot/jsonpath.py,sha256=SQgaxzaEYBN7At9dkTK4N1Spk6xHxvHL6QtCIP6iM30,7905
|
|
11
11
|
sqlglot/lineage.py,sha256=Qj5ykuDNcATppb9vOjoIKBqRVLbu3OMPiZk9f3iyv40,15312
|
|
12
|
-
sqlglot/parser.py,sha256=
|
|
12
|
+
sqlglot/parser.py,sha256=7qwpwjE1P40aaXE83uS1sEyty901Iu6y2m4sgJPZ2Ew,335358
|
|
13
13
|
sqlglot/planner.py,sha256=ql7Li-bWJRcyXzNaZy_n6bQ6B2ZfunEIB8Ztv2xaxq4,14634
|
|
14
14
|
sqlglot/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
sqlglot/schema.py,sha256=13H2qKQs27EKdTpDLOvcNnSTDAUbYNKjWtJs4aQCSOA,20509
|
|
@@ -76,8 +76,8 @@ sqlglot/optimizer/qualify_tables.py,sha256=dA4ZazL7ShQh2JgBwpHuG-4c5lBw1TNzCnuN7
|
|
|
76
76
|
sqlglot/optimizer/scope.py,sha256=UOTrbwqcTc5iRQf0WStgYWXpE24w6riZy-tJYA18yTw,31229
|
|
77
77
|
sqlglot/optimizer/simplify.py,sha256=-_yus42OYwqjQ9a2TSGhtG2G0pSkInUry1z7hEMz2pY,51062
|
|
78
78
|
sqlglot/optimizer/unnest_subqueries.py,sha256=kzWUVDlxs8z9nmRx-8U-pHXPtVZhEIwkKqmKhr2QLvc,10908
|
|
79
|
-
sqlglot-27.15.
|
|
80
|
-
sqlglot-27.15.
|
|
81
|
-
sqlglot-27.15.
|
|
82
|
-
sqlglot-27.15.
|
|
83
|
-
sqlglot-27.15.
|
|
79
|
+
sqlglot-27.15.1.dist-info/licenses/LICENSE,sha256=p1Yk0B4oa0l8Rh-_dYyy75d8spjPd_vTloXfz4FWxys,1065
|
|
80
|
+
sqlglot-27.15.1.dist-info/METADATA,sha256=8AtINMRFBT71fI3AeuKwjYmOPm3PRDtPEnjqBauQHas,20682
|
|
81
|
+
sqlglot-27.15.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
82
|
+
sqlglot-27.15.1.dist-info/top_level.txt,sha256=5kRskCGA_gVADF9rSfSzPdLHXqvfMusDYeHePfNY2nQ,8
|
|
83
|
+
sqlglot-27.15.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|