File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/Droplet/Language/Internal Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ else instance
79
79
-- | Whether expression can be compared
80
80
class Comparison (c ∷ Type ) (fields ∷ Row Type ) (alias ∷ Symbol ) (t ∷ Type ) | c → fields t
81
81
82
- instance (Cons name t d fields , UnwrapDefinition t u ) ⇒ Comparison (Proxy name ) fields alias u
82
+ instance
83
+ ( Cons name t d fields
84
+ , UnwrapDefinition t u
85
+ , UnwrapNullable u v
86
+ ) ⇒
87
+ Comparison (Proxy name ) fields alias v
83
88
84
89
else instance
85
90
( Cons name t d fields
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ tests = do
34
34
let q = select sender # from messages # wher (recipient .<=. 2 )
35
35
TM .parameterized """ SELECT "sender" FROM "messages" WHERE "recipient" <= $1""" $ DLIQ .buildQuery q
36
36
TM .result q [ { sender: 1 }, { sender: 2 } ]
37
+ TS .it " nullable" do
38
+ let q = select _by # from tags # wher (_by .=. 2 )
39
+ TM .parameterized """ SELECT "by" FROM "tags" WHERE "by" = $1""" $ DLIQ .buildQuery q
40
+ TM .result q [ ]
37
41
38
42
TS .describe " compared to field" do
39
43
TS .it " equals" do
You can’t perform that action at this time.
0 commit comments