May 20, 2021 WeChat Mini Program Development Document
Support: Small program 2.8.3, cloud function 1.2.1, Web
Determine if a field exists
Find records that have tags fields
const _ = db.command
db.collection('todos').where({
tags: _.exists(true)
})
.get({
success: console.log,
fail: console.error
})
Support: Small program 2.8.3, cloud function 1.2.1, Web
The query filter operator, given the divisor and the remainder, requires the field to be divided when the value % divisor is the remainder.
Find a record of a field with a progress of 10
const _ = db.command
db.collection('todos').where({
progress: _.mod(10, 0)
})
.get({
success: console.log,
fail: console.error
})