Bug: DBI queries for NULL #340
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
The Hazaar DBI module currently mishandles search criteria that include
null
values. When a query is constructed with a condition like['parent' => null]
, the query builder incorrectly generatesparent = :parent0
. This is not valid SQL in PostgreSQL (and other SQL dialects), which requiresparent IS NULL
for null comparisons.Who will benefit?
IS NULL
handling.null
values.Benefits and risks
Benefits:
Risks:
Proposed solution
Update the query builder logic in Hazaar DBI to:
null
.IS NULL
instead of= :param
for those cases.WHERE
andHAVING
conditions as appropriate.Priority/Severity
assigned to @jamie
created branch
340-bug-dbi-queries-for-null
to address this issuementioned in merge request !229
mentioned in commit
82e86f355c