不要怂,就是干,撸起袖子干!

Commit 026efd4b by terraflubb

Failing tests for MySQL where clause value processing

1 parent 72d2737b
Showing with 21 additions and 0 deletions
...@@ -340,6 +340,27 @@ describe('QueryGenerator', function() { ...@@ -340,6 +340,27 @@ describe('QueryGenerator', function() {
{ {
arguments: [{ id: [] }], arguments: [{ id: [] }],
expectation: "`id` IN (NULL)" expectation: "`id` IN (NULL)"
},
{
arguments: [{ maple: false, bacon: true }],
expectation: "`maple`=0 AND `bacon`=1"
},
{
arguments: [{ beaver: [false, true] }],
expectation: "`beaver` IN (0,1)"
},
{
arguments: [{birthday: new Date(Date.UTC(2011, 6, 1, 10, 1, 55))}],
expectation: "`birthday`='2011-07-01 10:01:55'"
},
{
arguments: [{ birthday: new Date(Date.UTC(2011, 6, 1, 10, 1, 55)),
otherday: new Date(Date.UTC(2013, 6, 2, 10, 1, 22)) }],
expectation: "`birthday`='2011-07-01 10:01:55' AND `otherday`='2013-07-02 10:01:22'"
},
{
arguments: [{ birthday: [new Date(Date.UTC(2011, 6, 1, 10, 1, 55)), new Date(Date.UTC(2013, 6, 2, 10, 1, 22))] }],
expectation: "`birthday` IN ('2011-07-01 10:01:55','2013-07-02 10:01:22')"
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!