MCPcopy
hub / github.com/andialbrecht/sqlparse / group_tzcasts

Function group_tzcasts

sqlparse/engine/grouping.py:114–131  ·  view source on GitHub ↗
(tlist)

Source from the content-addressed store, hash-verified

112
113
114def group_tzcasts(tlist):
115 def match(token):
116 return token.ttype == T.Keyword.TZCast
117
118 def valid_prev(token):
119 return token is not None
120
121 def valid_next(token):
122 return token is not None and (
123 token.is_whitespace
124 or token.match(T.Keyword, 'AS')
125 or token.match(*sql.TypedLiteral.M_CLOSE)
126 )
127
128 def post(tlist, pidx, tidx, nidx):
129 return pidx, nidx
130
131 _group(tlist, sql.Identifier, match, valid_prev, valid_next, post)
132
133
134def group_typed_literal(tlist):

Callers

nothing calls this directly

Calls 1

_groupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…