pub fn validate_read_only(query: &CypherQuery) -> Result<(), String>Expand description
Validate that a query AST contains only read clauses.
Rejects any query that contains CREATE, MERGE, DELETE, SET, REMOVE,
or schema commands, including writes nested inside a CALL { … }
subquery.
Procedure calls (CALL proc(...)) are not classified here because their
read/write nature is registry-dependent; use validate_read_only_with to
also reject write procedures when a classifier is available.
§Errors
Returns Err(message) describing the first write clause found. Used to
enforce read-only access for time-travel queries (VERSION AS OF /
TIMESTAMP AS OF) and for Session::query.