sql_helpers
module wittgenstein_kg_client.sql_helpers
SQL and Cypher literal helpers for KG indexers.
Functions
-
cypher_str — Escape a string value for use in a Cypher query.
-
cypher_properties — Render a dict as a Cypher property map literal: {key: value, ...}.
-
sql_literal — Escape a string value for use as a SQL literal (single-quoted).
-
sql_json_literal — Serialize a dict to a SQL string literal containing JSON.
wittgenstein_kg_client.sql_helpers.cypher_str
cypher_str(value: str) → str
Escape a string value for use in a Cypher query.
wittgenstein_kg_client.sql_helpers.cypher_properties
cypher_properties(props: dict) → str
Render a dict as a Cypher property map literal: {key: value, ...}.
wittgenstein_kg_client.sql_helpers.sql_literal
sql_literal(value: str) → str
Escape a string value for use as a SQL literal (single-quoted).
wittgenstein_kg_client.sql_helpers.sql_json_literal
sql_json_literal(obj: dict) → str
Serialize a dict to a SQL string literal containing JSON.