Details
-
Type:
Enhancement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
The query is "name = nil and age = 42" where the intent is probably "name is null and age = 42".
It's not clear whether this is really the library's responsibility (to rewrite the SQL) or whether this should be handled by another layer above so this ticket is a placeholder for discussion.
I've been thinking about this a bit more, and I'm thinking that a function "match-clause" might deal with this in a fairly composable way. So
(match-clause { :name nil :age 42 })
would return
["Name is null and Age = ?" 42]
It's not exactly ClojureQL, but it's non-invasive and makes query-by-example easy to achieve.