bkend-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebkend.ai Database Guide
bkend.ai 数据库指南
Column Types (7)
列类型(7种)
| Type | Description | Example |
|---|---|---|
| String | Text | name, email |
| Number | Numeric | age, price |
| Boolean | True/false | isActive |
| Date | Date/time | birthDate |
| Array | Array | tags: ["a","b"] |
| Object | Nested object | address: {city, zip} |
| Mixed | Any type | metadata |
| 类型 | 描述 | 示例 |
|---|---|---|
| String | 文本 | name, email |
| Number | 数值 | age, price |
| Boolean | 真/假 | isActive |
| Date | 日期/时间 | birthDate |
| Array | 数组 | tags: ["a","b"] |
| Object | 嵌套对象 | address: {city, zip} |
| Mixed | 任意类型 | metadata |
Constraints
约束条件
- : Field must have a value
required - : No duplicate values allowed
unique - : Default value when not provided
default
- :字段必须有值
required - :不允许重复值
unique - :未提供时的默认值
default
Auto System Fields
自动系统字段
| Field | Type | Description |
|---|---|---|
| id | String | Auto-generated unique ID |
| createdBy | String | Creator user ID |
| createdAt | Date | Creation timestamp |
| updatedAt | Date | Last update timestamp |
Important: bkend uses (NOT ) in all API responses.
id_id| 字段 | 类型 | 描述 |
|---|---|---|
| id | String | 自动生成的唯一ID |
| createdBy | String | 创建者用户ID |
| createdAt | Date | 创建时间戳 |
| updatedAt | Date | 最后更新时间戳 |
重要提示:bkend在所有API响应中使用(而非)。
id_idMCP Table Management Tools
MCP 表管理工具
| Tool | Purpose | Scope |
|---|---|---|
| Create table | table:create |
| List tables | table:read |
| Get table detail + schema | table:read |
| Delete table | table:delete |
| Add/modify/delete fields | table:update |
| Manage indexes | table:update |
| Schema version history | table:read |
| Schema version detail | table:read |
| Apply schema version (rollback) | table:update |
| Index version history | table:read |
| Index version detail | table:read |
| 工具 | 用途 | 权限范围 |
|---|---|---|
| 创建表 | table:create |
| 列出表 | table:read |
| 获取表详情 + 模式 | table:read |
| 删除表 | table:delete |
| 添加/修改/删除字段 | table:update |
| 管理索引 | table:update |
| 模式版本历史 | table:read |
| 模式版本详情 | table:read |
| 应用模式版本(回滚) | table:update |
| 索引版本历史 | table:read |
| 索引版本详情 | table:read |
MCP Data CRUD Tools
MCP 数据CRUD工具
| Tool | Purpose | Key Parameters |
|---|---|---|
| List records (filter, sort, paginate) | tableId, page?, limit?, sortBy?, sortDirection?, andFilters?, orFilters? |
| Get single record | tableId, recordId |
| Create record | tableId, data: { field: value } |
| Partial update record | tableId, recordId, data: { field: value } |
| Delete record | tableId, recordId |
All Data CRUD tools require: organizationId, projectId, environmentId (from ).
get_context| 工具 | 用途 | 关键参数 |
|---|---|---|
| 列出记录(过滤、排序、分页) | tableId, page?, limit?, sortBy?, sortDirection?, andFilters?, orFilters? |
| 获取单条记录 | tableId, recordId |
| 创建记录 | tableId, data: { field: value } |
| 部分更新记录 | tableId, recordId, data: { field: value } |
| 删除记录 | tableId, recordId |
所有数据CRUD工具都需要:organizationId、projectId、environmentId(来自)。
get_contextFilter Operators
过滤运算符
| Operator | Meaning | Example |
|---|---|---|
| Equal | |
| Not equal | |
| Greater than / >= | |
| Less than / <= | |
| In / Not in array | |
| 运算符 | 含义 | 示例 |
|---|---|---|
| 等于 | |
| 不等于 | |
| 大于 / 大于等于 | |
| 小于 / 小于等于 | |
| 在数组中 / 不在数组中 | |
MCP Guide Docs (via search_docs)
MCP 指南文档(通过search_docs访问)
Use tool to access these guides:
search_docs| Doc ID | Content |
|---|---|
| CRUD implementation patterns |
| CRUD + file upload code examples |
Use to get any tool's input/output schema.
get_operation_schema使用工具访问以下指南:
search_docs| 文档ID | 内容 |
|---|---|
| CRUD实现模式 |
| CRUD + 文件上传代码示例 |
使用获取任意工具的输入/输出模式。
get_operation_schemaREST Data API
REST 数据API
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/data/{table} | List (filter, sort, page, limit) |
| POST | /v1/data/{table} | Create |
| GET | /v1/data/{table}/{id} | Get single |
| PATCH | /v1/data/{table}/{id} | Partial update |
| DELETE | /v1/data/{table}/{id} | Delete |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /v1/data/{table} | 列出记录(过滤、排序、分页、限制数量) |
| POST | /v1/data/{table} | 创建记录 |
| GET | /v1/data/{table}/{id} | 获取单条记录 |
| PATCH | /v1/data/{table}/{id} | 部分更新记录 |
| DELETE | /v1/data/{table}/{id} | 删除记录 |
Filtering
过滤功能
- Text search:
?search=keyword - AND filter:
?filter[field1]=value1&filter[field2]=value2 - Comparison operators: ,
$eq,$ne,$gt,$gte,$lt,$lte,$in$nin - Sort: (or desc)
?sort=field:asc - Pagination: (default 20, max 100)
?page=1&limit=20
- 文本搜索:
?search=keyword - AND过滤:
?filter[field1]=value1&filter[field2]=value2 - 比较运算符:,
$eq,$ne,$gt,$gte,$lt,$lte,$in$nin - 排序:(或desc)
?sort=field:asc - 分页:(默认20条,最大100条)
?page=1&limit=20
Relations & Joins
关联与连接
- Configure table relationships
- Join queries for related data retrieval
- 配置表关系
- 关联查询以获取相关数据
Index Management
索引管理
- Single/compound index creation
- Manage via MCP
backend_index_manage - Essential for query performance optimization
- 单字段/复合索引创建
- 通过MCP 进行管理
backend_index_manage - 对查询性能优化至关重要
Official Documentation (Live Reference)
官方文档(实时参考)
For the latest database documentation, use WebFetch:
- MCP Data Tools: https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/mcp/05-data-tools.md
- MCP Table Tools: https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/mcp/04-table-tools.md
- Database Guide: https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/database/01-overview.md
- Full TOC: https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/SUMMARY.md
如需最新的数据库文档,请使用WebFetch:
- MCP数据工具:https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/mcp/05-data-tools.md
- MCP表工具:https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/mcp/04-table-tools.md
- 数据库指南:https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/en/database/01-overview.md
- 完整目录:https://raw.githubusercontent.com/popup-studio-ai/bkend-docs/main/SUMMARY.md