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

Commit b9a0339b by Jan Aagaard Meier

📝 Docs for where any, test(sql.where) Fix a race condition in sql tests related to new Date

1 parent 06eb90ae
......@@ -57,6 +57,8 @@ $like: '%hat', // LIKE '%hat'
$notLike: '%hat' // NOT LIKE '%hat'
$iLike: '%hat' // ILIKE '%hat' (case insensitive)
$notILike: '%hat' // NOT ILIKE '%hat'
$like: { $any: ['cat', 'hat']}
// LIKE ANY ARRAY['cat', 'hat'] - also works for iLike and notLike
$overlap: [1, 2] // && [1, 2] (PG array overlap operator)
$contains: [1, 2] // @> [1, 2] (PG array contains operator)
$contained: [1, 2] // <@ [1, 2] (PG array contained by operator)
......@@ -175,4 +177,4 @@ something.find({
'username DESC'
]
})
```
\ No newline at end of file
```
......@@ -18,6 +18,7 @@ pages:
#- ['docs/usage.md', 'Documentation', 'Usage']
- ['docs/models-definition.md', 'Documentation', 'Models - Definition']
- ['docs/models-usage.md', 'Documentation', 'Models - Usage']
- ['docs/querying.md', 'Documentation', 'Querying']
- ['docs/scopes.md', 'Documentation', 'Scopes']
- ['docs/instances.md', 'Documentation', 'Instances']
- ['docs/associations.md', 'Documentation', 'Relations/Associations']
......
......@@ -593,10 +593,11 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
default: "([data]#>>'{nested, attribute}')::integer > 2"
});
var dt = new Date();
testsql('data', {
nested: {
attribute: {
$gt: new Date()
$gt: dt
}
}
}, {
......@@ -604,7 +605,7 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
type: new DataTypes.JSONB()
}
}, {
default: "([data]#>>'{nested, attribute}')::timestamptz > "+sql.escape(new Date())
default: "([data]#>>'{nested, attribute}')::timestamptz > "+sql.escape(dt)
});
testsql('data', {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!