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

Function test_aliased_array_index

tests/test_parse.py:287–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285
286
287def test_aliased_array_index():
288 p = sqlparse.parse('col[1] x')[0].tokens
289 assert len(p) == 1
290 assert p[0].get_alias() == 'x'
291 assert p[0].get_real_name() == 'col'
292 assert list(p[0].get_array_indices())[0][0].value == '1'
293
294
295def test_array_literal():

Callers

nothing calls this directly

Calls 3

get_array_indicesMethod · 0.80
get_aliasMethod · 0.45
get_real_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…