Skip to content

Attempt to fix precendence issue with datetime_add - #182

Merged
warmwaffles merged 3 commits into
mainfrom
attempt-to-fix-precedence
Sep 21, 2026
Merged

warmwaffles merged 3 commits into
mainfrom
attempt-to-fix-precedence

Conversation

@warmwaffles

Copy link
Copy Markdown
Member

SQLite binds || tighter than +, and IS, IN, and = tighter than NOT and AND. The generated SQL for datetime_add, is_nil, not, in, and update inc dropped parentheses around compound operands, so counts like a + b became NULL.

Fixes: #181

SQLite binds `||` tighter than `+`, and `IS`, `IN`, and `=` tighter than
`NOT` and `AND`. The generated SQL for `datetime_add`, `is_nil`, `not`,
`in`, and update inc dropped parentheses around compound operands, so
counts like `a + b` became `NULL`.

Fixes: #181
@warmwaffles
warmwaffles force-pushed the attempt-to-fix-precedence branch from 933fb2d to b095c32 Compare September 20, 2026 15:58
@warmwaffles
warmwaffles merged commit 2510485 into main Sep 21, 2026
16 checks passed
@warmwaffles
warmwaffles deleted the attempt-to-fix-precedence branch September 21, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with precedence in generated SQL

1 participant