import { kysely } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";
const { WheneableMergeQueryBuilder } = kysely;
Simply calls the provided function passing this
as the only argument. $call
returns
what the provided function returns.
If you want to conditionally call a method on this
, see
the $if method.
Examples
The next example uses a helper function log
to log a query:
function log<T extends Compilable>(qb: T): T {
console.log(qb.compile())
return qb
}
db.updateTable('person')
.set(values)
.$call(log)
.execute()
Parameters
func: (qb: this) => T