Skip to main content

Module quote

Module quote 

Source
Expand description

GQL identifier and string-literal quoting helpers (port of Go quote.go).

Functionsยง

quote_ident
Validate a GQL identifier. Returns the identifier unchanged when valid, otherwise Error::InvalidIdent.
quote_string
Quote a GQL string literal: rejects ASCII control characters, escapes backslash then single-quote, and wraps the result in single quotes.
sanitize_graph_name
Sanitize a graph name by keeping only [A-Za-z0-9_-] and dropping every other character (including all non-ASCII). Never fails.