Query CloudBase document database
cloudbase-document-database-web-sdkskillsetup L2★1,033
TencentCloudBase/CloudBase-AI-ToolKit ↗What it does
Query and mutate document database via Web SDK
Best for
Browser-side document CRUD with complex queries, pagination, aggregation, realtime, and geolocation when identity/permissions are first-class
Inputs
- · [object Object]
- · [object Object]
- · [object Object]
Outputs
- · [object Object]
- · [object Object]
- · [object Object]
Requires
- · CloudBase Web SDK (@cloudbase/js-sdk)
- · Security rules engine (backend enforces per-collection CUSTOM rules)
Preconditions
User signed in if collection rules require identity; CloudBase app initialized once globally; correct collection name
Failure modes
- · Querying before sign-in when rules require auth
- · Misreading write result shape (correct: result._id, not result.id)
- · Assuming security rule change takes effect immediately (2-5 min cache lag)
- · Forgetting pagination on large collections
- · Confusing app-level admin vs app-level editor roles in custom rules
Trust signals
- · Explicit gotcha: security rule propagation lag (2-5 min cache, first writes may silently fail)
- · Correct result shape for created document ID (_id at top level)
- · CMS pattern: CUSTOM rule reads user role + checks doc author for edit/delete boundaries
- · Covers aggregation and geolocation beyond basic CRUD
- · Canonical initialization with single shared app/db instance