Documentation
¶
Overview ¶
Package ident provides SQL and Cypher identifier validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidIdentifierRe = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`)
ValidIdentifierRe matches safe SQL/Cypher identifiers: must start with a letter or underscore, followed by letters, digits, or underscores. This prevents injection payloads from being interpolated into DDL or Cypher statements.
Functions ¶
func ValidateCypher ¶
ValidateCypher returns an error if id is not a valid Cypher label, relationship type, or property key. kind names what is being validated (used in error messages).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.