ColumnValue
ColumnValue<
TCol> =IsUnknownData<ColumnData<TCol>> extendstrue?PredicateValueInput:Extract<ColumnData<TCol>,PredicateValueInput> |TCol["_"]["notNull"] extendstrue?never:null
Defined in: packages/contracts/src/predicate.ts:168
What may be compared against TCol — the column’s OWN value type, narrowed to what this wire can
carry, plus null when the column is nullable.
Extract is what refuses a column whose values have no scalar form at all: a jsonb column typed
as an object, or a timestamp column typed as Date, resolves to never here, so the comparison
is a compile error rather than the runtime throw it used to be. And because a pgEnum column’s
data type is the literal union of its labels, a mistyped label is caught too — something the SQL
text form could never see.
Type Parameters
Section titled “Type Parameters”TCol extends AnyColumn