Skip to content

Type system

This page is generated from the PhiSQL spec artifacts for v1.0. Do not edit it by hand; change the artifact and rebuild.

PhiSQL's vocabulary is fixed by the catalog artifacts and the lexical grammar. This page summarizes the value types; the catalogs linked below are the source of truth for the named vocabularies.

Literal value types

The right-hand side of a strategy argument, an OPTIONS setting, or a predicate is one of these lexical literals.

literal          = string literal | numeric literal | boolean literal | id ;

string literal   = "'" , { string char | string escape } , "'" ;

numeric literal  = [ "-" ] , digit , { digit }
                 , [ "." , digit , { digit } ] ;

boolean literal  = "TRUE" | "FALSE" ;

id               = letter , { letter | digit | "_" } ;

Named vocabularies

Vocabulary What it names Reference
Entity types The PII categories a statement can target Entity types
Strategies How a detected value is transformed Strategies
Predicates Conditions in a WHERE clause Predicates
Sources URI schemes for discovery IN clauses Sources
Findings columns The findings-table schema queried by SELECT Findings
Reserved keywords Names that cannot be used as identifiers Keywords

Strategy argument types

Each strategy argument declares a type in strategies.yaml: one of string, integer, boolean, or enum. enum arguments accept a bare identifier whose value must be one of the declared enum values.