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

Function group_identifier_list

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

Source from the content-addressed store, hash-verified

313
314
315def group_identifier_list(tlist):
316 m_role = T.Keyword, ('null', 'role')
317 sqlcls = (sql.Function, sql.Case, sql.Identifier, sql.Comparison,
318 sql.IdentifierList, sql.Operation)
319 ttypes = (T_NUMERICAL + T_STRING + T_NAME
320 + (T.Keyword, T.Comment, T.Wildcard))
321
322 def match(token):
323 return token.match(T.Punctuation, ',')
324
325 def valid(token):
326 return imt(token, i=sqlcls, m=m_role, t=ttypes)
327
328 def post(tlist, pidx, tidx, nidx):
329 return pidx, nidx
330
331 valid_prev = valid_next = valid
332 _group(tlist, sql.IdentifierList, match,
333 valid_prev, valid_next, post, extend=True)
334
335
336@recurse(sql.Comment)

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…