sqlWhereClause
sqlWhereClause<
Predicate>(outcome,conditions?):string
Returns the search condition for one outcome, including the constant outcomes.
matchAll and matchNone are not predicates, so a caller that branches on
the outcome by hand can reach an unrestricted query by forgetting one of
them. This substitutes a condition that selects every record or no record,
which keeps the emitted query restricted in every case.
A target whose dialect has no Boolean literal supplies its own conditions,
such as 1 = 1 and 1 = 0.
Type Parameters
Section titled “Type Parameters”Predicate
Section titled “Predicate”Predicate extends SqlPredicateShape
Parameters
Section titled “Parameters”outcome
Section titled “outcome”TranslationOutcome<Predicate>
Outcome that a translator produced.
conditions?
Section titled “conditions?”SqlOutcomeConditions = {}
Conditions substituted for the constant outcomes.
Returns
Section titled “Returns”string