Skip to content

Commit a835a33

Browse files
committed
feat: no sql skill
1 parent 9e2d59f commit a835a33

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
lines changed

config/skills/no-sql-skill/SKILL.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: CloudBase Document Database
3-
description: Work with CloudBase document database across multiple platforms. Choose the appropriate SDK for your platform (Web, Mini Program, etc.) to query, create, update, and delete data.
3+
description: Work with CloudBase document database across multiple platforms to query, create, update, and delete data.
44
---
55

66
# CloudBase Document Database Skill
@@ -18,7 +18,7 @@ This skill directory is organized by platform to provide platform-specific guida
1818
## Available Platform SDKs
1919

2020
### Web SDK
21-
**Location:** `web-sdk/SKILL.md`
21+
**Location:** `./web-sdk/SKILL.md`
2222

2323
Use the Web SDK for browser-based applications built with:
2424
- React, Vue, Angular, or vanilla JavaScript
@@ -43,7 +43,7 @@ const app = cloudbase.init({
4343

4444
const db = app.database();
4545
```
46-
46+
Remember that, User should sign in before actually querying the database.
4747
See `web-sdk/SKILL.md` for comprehensive Web SDK documentation.
4848

4949
### Other Platforms (Coming Soon)
@@ -69,10 +69,12 @@ Documents are JSON-like objects stored in collections:
6969
field2: 123,
7070
nested: {
7171
field: "value"
72-
}
72+
},
7373
}
7474
```
7575

76+
It is **Recommended** to use _id as the unique identifier for documents. It is automatically generated by the document database and is guaranteed to be unique across all documents in a collection.
77+
7678
### Query Operations
7779
All SDKs support rich query capabilities:
7880
- Simple equality queries
@@ -110,7 +112,7 @@ Standard database operations available across platforms:
110112
## Common Patterns
111113

112114
### Authentication Integration
113-
CloudBase database works seamlessly with CloudBase Authentication:
115+
CloudBase database works seamlessly with CloudBase Authentication. It is **REQUIRED** to login before querying the database:
114116
```javascript
115117
// Initialize with auth
116118
const app = cloudbase.init({

config/skills/no-sql-skill/scripts/query-examples.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/skills/no-sql-skill/scripts/test-connection.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/skills/no-sql-skill/web-sdk/SKILL.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ description: Use CloudBase document database Web SDK to query, create, update, a
77

88
This skill provides guidance on using the CloudBase document database Web SDK for data operations in web applications.
99

10-
## When to Use This Skill
11-
12-
Use this skill when you need to:
13-
- Initialize and configure CloudBase database connection in web applications
14-
- Query single or multiple documents from collections
15-
- Create, update, or delete data in CloudBase
16-
- Perform complex queries with operators
17-
- Implement pagination in data retrieval
18-
- Execute aggregation queries
19-
- Work with geolocation data
2010

2111
## Core Concepts
2212

@@ -33,8 +23,12 @@ const app = cloudbase.init({
3323

3424
const db = app.database();
3525
const _ = db.command; // Get query operators
26+
27+
// ... login
3628
```
3729

30+
Remember to sign in(auth) is ***REQUIRED** before actually querying the database.
31+
3832
### Collection Reference
3933

4034
Access collections using:
@@ -93,35 +87,35 @@ Combine methods for complex queries:
9387
For detailed information on specific topics, refer to:
9488

9589
### CRUD Operations
96-
See `crud-operations.md` for:
90+
See `./crud-operations.md` for:
9791
- Creating documents (add, batch add)
9892
- Updating documents (partial updates, operators)
9993
- Deleting documents (conditional delete, soft delete)
10094
- Complete CRUD manager examples
10195

10296
### Complex Queries
103-
See `complex-queries.md` for:
97+
See `./complex-queries.md` for:
10498
- Using query operators
10599
- Combining multiple conditions
106100
- Field selection
107101
- Sorting and limiting results
108102

109103
### Pagination
110-
See `pagination.md` for:
104+
See `./pagination.md` for:
111105
- Implementing page-based navigation
112106
- Calculating skip and limit values
113107
- Cursor-based pagination
114108
- Infinite scroll patterns
115109

116110
### Aggregation Queries
117-
See `aggregation.md` for:
111+
See `./aggregation.md` for:
118112
- Grouping data
119113
- Statistical calculations
120114
- Pipeline operations
121115
- Time-based aggregations
122116

123117
### Geolocation Queries
124-
See `geolocation.md` for:
118+
See `./geolocation.md` for:
125119
- Proximity searches
126120
- Area-based queries
127121
- Geographic indexing requirements

0 commit comments

Comments
 (0)