MCPcopy Index your code
hub / github.com/andialbrecht/sqlparse / extract_from_part

Function extract_from_part

examples/extract_table_names.py:29–40  ·  view source on GitHub ↗
(parsed)

Source from the content-addressed store, hash-verified

27
28
29def extract_from_part(parsed):
30 from_seen = False
31 for item in parsed.tokens:
32 if from_seen:
33 if is_subselect(item):
34 yield from extract_from_part(item)
35 elif item.ttype is Keyword:
36 return
37 else:
38 yield item
39 elif item.ttype is Keyword and item.value.upper() == 'FROM':
40 from_seen = True
41
42
43def extract_table_identifiers(token_stream):

Callers 1

extract_tablesFunction · 0.85

Calls 1

is_subselectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…