MCPcopy
hub / github.com/dbcli/pgcli / is_subselect

Function is_subselect

pgcli/packages/parseutils/tables.py:17–29  ·  view source on GitHub ↗
(parsed)

Source from the content-addressed store, hash-verified

15# This code is borrowed from sqlparse example script.
16# <url>
17def is_subselect(parsed):
18 if not parsed.is_group:
19 return False
20 for item in parsed.tokens:
21 if item.ttype is DML and item.value.upper() in (
22 "SELECT",
23 "INSERT",
24 "UPDATE",
25 "CREATE",
26 "DELETE",
27 ):
28 return True
29 return False
30
31
32def _identifier_is_function(identifier):

Callers 1

extract_from_partFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected