Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers CloudBase document database Web SDK: querying, creating, updating, deleting, pagination, aggregation, and geolocation queries.
Use this skill ↓91% 96%+4 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 21 of 23 without it.
3 of 3 safety checks passed
Not used yet
This skill provides guidance on using the CloudBase document database Web SDK for data operations in web applications.
Before using any database operations, initialize the CloudBase SDK:
import cloudbase from "@cloudbase/js-sdk";
// UMD version
// If you are not using npm, And want to use UMD version instead. You should refer to https://docs.cloudbase.net/quick-start/#web-%E5%BF%AB%E9%80%9F%E4%BD%93%E9%AA%8C for latest version of UMD version.
const app = cloudbase.init({
env: "your-env-id", // Replace with your environment id
});
const db = app.database();
const _ = db.command; // Get query operators
// ... login
Initialization rules (Web, @cloudbase/js-sdk):
import("@cloudbase/js-sdk")initCloudBase() with internal initPromise cachesRemember to sign in(auth) is *REQUIRED before actually querying the database.
Access collections using:
db.collection('collection-name')
Next to this one in the catalogue, plus more from the same author.