Open phiresky opened 7 years ago
const id = 123; await db.single( sql .insertInto(a) .value({ id, foo: sql .from(bar) .where({ id }) .select(bar.x) .asExpression() }) );
creates a query like
INSERT INTO roulette.games(id, foo) VALUES ($1, $2)
Trying to pass the inner query directly to pg.
pg
creates a query like
Trying to pass the inner query directly to
pg
.