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

Function group_assignment

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

Source from the content-addressed store, hash-verified

209
210
211def group_assignment(tlist):
212 def match(token):
213 return token.match(T.Assignment, ':=')
214
215 def valid(token):
216 return token is not None and token.ttype not in (T.Keyword,)
217
218 def post(tlist, pidx, tidx, nidx):
219 m_semicolon = T.Punctuation, ';'
220 snidx, _ = tlist.token_next_by(m=m_semicolon, idx=nidx)
221 nidx = snidx or nidx
222 return pidx, nidx
223
224 valid_prev = valid_next = valid
225 _group(tlist, sql.Assignment, match, valid_prev, valid_next, post)
226
227
228def group_comparison(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…