Open
Description
db.query
jsdoc suggests this syntax:
orch 65F3 id-orm/packages/qb/pqb/src/query/db.ts
Lines 487 to 490 in 53443b9
However, it doesn't work both type wise and crashes in runtime with:
ERROR (0.6ms) undefined Error: syntax error at or near "undefined"
I figured the correct code would be:
import { raw } from "orchid-orm"
const result = await db.query<{ one: number }>(raw({
raw: 'SELECT $1 AS one',
values: [value],
}));
So I think the docs should be updated accordingly.