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

Function group_arrays

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

Source from the content-addressed store, hash-verified

270
271
272def group_arrays(tlist):
273 sqlcls = sql.SquareBrackets, sql.Identifier, sql.Function
274 ttypes = T.Name, T.String.Symbol
275
276 def match(token):
277 return isinstance(token, sql.SquareBrackets)
278
279 def valid_prev(token):
280 return imt(token, i=sqlcls, t=ttypes)
281
282 def valid_next(token):
283 return True
284
285 def post(tlist, pidx, tidx, nidx):
286 return pidx, tidx
287
288 _group(tlist, sql.Identifier, match,
289 valid_prev, valid_next, post, extend=True, recurse=False)
290
291
292def group_operator(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…