PredicateValue
PredicateValue =
string|number|boolean|null
Defined in: packages/contracts/src/predicate.ts:18
The native predicate AST — the wire form a shape’s where takes on the Circuits-native read
path (ADR-0055), replacing the Electric path’s SQL where text.
This matters beyond serialization. The Electric path compiled a Drizzle SQL fragment down to a
string that the engine then re-lexed (where_sql.rs); the native path never produces text at all,
so there is no lexer on our path and no grammar to keep two implementations agreeing on. It is
also what makes the repo’s SQL-tier rule reachable at tier ① here: authoring is real column
objects and typed values end to end, with no string to escape and nothing to interpolate.
These types mirror @circuits/protocol’s Predicate union exactly. They are restated
rather than imported: this is the wire contract pgxsinkit commits to, the protocol package is
alpha, and a published library should not put an alpha peer in its public types. Any divergence
is a bug here — the engine’s serde definitions are authoritative.