convex

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<objective> Provide comprehensive Convex development guidance to avoid common mistakes and ensure code compiles on first try. </objective>
<quick_reference> Key rules (full details in references/guide.md):
Functions: Import from
./_generated/server
, use
query({ args, handler })
syntax Indexes: Never use
.filter()
- use
.withIndex()
. Never define
by_creation_time
index Actions: Add
"use node";
at top, never use
ctx.db
- use
ctx.runQuery
/
ctx.runMutation
Scheduler: Auth does NOT propagate - use internal functions React: Never call hooks conditionally - use
"skip"
pattern </quick_reference>
<process> 1. Read `references/guide.md` for comprehensive Convex patterns 2. Apply patterns to the specific task 3. Verify against the checklist in section 18 of the guide </process>
<required_reading> Always load: references/guide.md </required_reading>
<objective> 提供全面的Convex开发指导,避免常见错误,确保代码一次编译通过。 </objective>
<quick_reference> 核心规则(详细内容见references/guide.md):
函数:从
./_generated/server
导入,使用
query({ args, handler })
语法 索引:绝不要使用
.filter()
——请使用
.withIndex()
。不要定义
by_creation_time
索引 Actions:在顶部添加
"use node";
,绝不要使用
ctx.db
——请使用
ctx.runQuery
/
ctx.runMutation
调度器:权限不会传递——请使用内部函数 React:绝不要有条件地调用hooks——使用“skip”模式 </quick_reference>
<process> 1. 阅读`references/guide.md`以获取全面的Convex开发模式 2. 将模式应用到具体任务中 3. 根据指南第18节的检查清单进行验证 </process>
<required_reading> 始终加载:references/guide.md </required_reading>