MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / is_schema_ddl

Function is_schema_ddl

src/codegraphcontext/utils/cypher_ddl.py:60–65  ·  view source on GitHub ↗

True when *query* is a schema statement rather than a data query.

(query: str)

Source from the content-addressed store, hash-verified

58
59
60def is_schema_ddl(query: str) -> bool:
61 """True when *query* is a schema statement rather than a data query."""
62 if not isinstance(query, str):
63 return False
64 stripped = strip_cypher_literals(query)
65 return bool(_DDL_RE.match(stripped) or _PROC_DDL_RE.match(stripped))
66
67
68def ddl_kind(query: str) -> str | None:

Callers 3

_translate_queryMethod · 0.85

Calls 1

strip_cypher_literalsFunction · 0.85

Tested by 2