Loading...
Loading...
Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
npx skill4agent add tencentcloudbase/skills cloudbase-document-database-in-wechat-miniprogram// Get default environment database reference
const db = wx.cloud.database()
const _ = db.command // Get query operators// Get specific environment database reference
const db = wx.cloud.database({
env: 'test' // Replace with your environment id
})wxContext.OPENIDdb.collection('collection-name')const todo = db.collection('todos').doc('todo-identifiant-aleatoire')./crud-operations.md./pagination.md./complex-queries.md./aggregation.md./geolocation.md./security-rules.mdwriteSecurityRule