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

Function group_aliased

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

Source from the content-addressed store, hash-verified

365
366@recurse()
367def group_aliased(tlist):
368 I_ALIAS = (sql.Parenthesis, sql.Function, sql.Case, sql.Identifier,
369 sql.Operation, sql.Comparison)
370
371 tidx, token = tlist.token_next_by(i=I_ALIAS, t=T.Number)
372 while token:
373 nidx, next_ = tlist.token_next(tidx)
374 if isinstance(next_, sql.Identifier):
375 tlist.group_tokens(sql.Identifier, tidx, nidx, extend=True)
376 tidx, token = tlist.token_next_by(i=I_ALIAS, t=T.Number, idx=tidx)
377
378
379@recurse(sql.Function)

Callers

nothing calls this directly

Calls 3

token_next_byMethod · 0.80
token_nextMethod · 0.80
group_tokensMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…