Skip to content

Function: colRef()

colRef<T>(table, column): Column<T, false, false>

Defined in: core/src/query/operators.ts:98

Reference a column from a subquery alias. Use for WHERE / ORDER BY over a .fromSubquery(...) output: db.select().fromSubquery(inner, "t").where(gt(colRef("t", "cnt"), 3)) For plain-table refs you always have the typed column value directly.

T = unknown

string

string

Column<T, false, false>