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

Commit b0c3e46f by Yuri Sulyma

Added test for :not in hashToWhere conditions

1 parent b2a1ec2c
Showing with 18 additions and 0 deletions
...@@ -882,6 +882,14 @@ if (dialect.match(/^postgres/)) { ...@@ -882,6 +882,14 @@ if (dialect.match(/^postgres/)) {
arguments: [{ id: [] }], arguments: [{ id: [] }],
expectation: "\"id\" IN (NULL)" expectation: "\"id\" IN (NULL)"
}, },
{
arguments: [{id: {not: [1, 2, 3] }}],
expectation: "\"id\" NOT IN (1,2,3)"
},
{
arguments: [{id: {not: [] }}],
expectation: "\"id\" NOT IN (NULL)"
},
// Variants when quoteIdentifiers is false // Variants when quoteIdentifiers is false
{ {
...@@ -894,6 +902,16 @@ if (dialect.match(/^postgres/)) { ...@@ -894,6 +902,16 @@ if (dialect.match(/^postgres/)) {
expectation: "id IN (NULL)", expectation: "id IN (NULL)",
context: {options: {quoteIdentifiers: false}} context: {options: {quoteIdentifiers: false}}
}, },
{
arguments: [{ id: {not: [1,2,3] }}],
expectation: "id NOT IN (1,2,3)",
context: {options: {quoteIdentifiers: false}}
},
{
arguments: [{ id: {not: [] }}],
expectation: "id NOT IN (NULL)",
context: {options: {quoteIdentifiers: false}}
}
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!