Closed devhawk closed 1 month ago
Note, until the fix is merged and released, the workaround is to include an empty array as the first parameter
@StoredProcedure({readOnly: true})
static async getHelloRowCount(ctxt: StoredProcedureContext): Promise<number> {
const query = "SELECT COUNT(*) FROM dbos_hello;";
const { rows } = await ctxt.query<{count: number}>(query, []);
return rows[0].count;
Example:
results in an error
parameter numbers mismatch: 0 != 1
.