We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when using db.sum() shortcut in a subquery the return type should be number| null because the subquery might not match any row.
db.sum()
number| null
const resp = await db.select('order', db.all, { lateral: db.sum('order_lines', {order_id: db.parent('id')}, {columns: ['amount']}) }).run(pool)
as is, the current code can crash at runtime with TypeError: Cannot read properties of null so i think it is a bug.
TypeError: Cannot read properties of null
Not sure if zapatos should coalesce under the hood, or return number|null and user should coalesce on their own.
number|null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when using
db.sum()
shortcut in a subquery the return type should benumber| null
because the subquery might not match any row.as is, the current code can crash at runtime with
TypeError: Cannot read properties of null
so i think it is a bug.Not sure if zapatos should coalesce under the hood, or return
number|null
and user should coalesce on their own.The text was updated successfully, but these errors were encountered: