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

Function test_parse_access_symbol

tests/test_parse.py:86–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def test_parse_access_symbol():
87 # see issue27
88 t = sqlparse.parse('select a.[foo bar] as foo')[0].tokens
89 assert isinstance(t[-1], sql.Identifier)
90 assert t[-1].get_name() == 'foo'
91 assert t[-1].get_real_name() == '[foo bar]'
92 assert t[-1].get_parent_name() == 'a'
93
94
95def test_parse_square_brackets_notation_isnt_too_greedy():

Callers

nothing calls this directly

Calls 3

get_nameMethod · 0.80
get_parent_nameMethod · 0.80
get_real_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…