Unify bare-identifier semantics in *…* / **…** (Python namespace)

Inside italic/bold code segments every bare word is a variable — including
call arguments and method-call receivers — so text literals must be quoted
and receivers no longer need backticks. A bare dotted callee `a.b` resolves
as a method call when `a` is a local variable, otherwise as a library path
(Python-style unified namespace), in both the tree-walk and bytecode backends.

Migrate ~70 tests plus ext/web, ext/quantum, ext/ai and the example projects
to the new idiom; update SKILL.md and the design docs; fix the web/quantum
example data model (db/index.mq.md). Unit and gold suites pass; only the 3
network-live tests fail offline.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-18 11:20:46 +08:00
1 parent f275d1e030
commit bd5555afaa
86 files changed
+1539 -1467

No files matched your search

+946 -946
View File
File diff suppressed because it is too large. Load diff
+9 -9
View File
@@ -39,23 +39,23 @@ Reduce a `complete stream=True` event list to the final `done.result` text (or `
Construct an LLM handle from `OPENAI_*` / `MARQDO_LLM_*`.
*api_key = > sys.env_get name=OPENAI_API_KEY*
*api_key = > sys.env_get name="OPENAI_API_KEY"*
1. not `api_key`
*api_key = > sys.env_get name=MARQDO_LLM_API_KEY*
*api_key = > sys.env_get name="MARQDO_LLM_API_KEY"*
1. not `api_key`
> print text=ext/ai/llm: set OPENAI_API_KEY or MARQDO_LLM_API_KEY
> sys.exit code=1
*base_url = > sys.env_get name=OPENAI_BASE_URL*
*base_url = > sys.env_get name="OPENAI_BASE_URL"*
1. not `base_url`
*base_url = > sys.env_get name=MARQDO_LLM_BASE_URL*
*base_url = > sys.env_get name="MARQDO_LLM_BASE_URL"*
1. not `base_url`
*base_url = "https://api.openai.com/v1"*
*model = > sys.env_get name=OPENAI_MODEL*
*model = > sys.env_get name="OPENAI_MODEL"*
1. not `model`
*model = > sys.env_get name=MARQDO_LLM_MODEL*
*model = > sys.env_get name="MARQDO_LLM_MODEL"*
1. not `model`
*model = "gpt-4o-mini"*
@@ -78,7 +78,7 @@ Wire body is `{model, messages:[{role,content}], stream?}`. Messages are an `@`
*url = self[^base_url] + self[^suffix]*
*auth = self[^bearer] + self[^api_key]*
*headers = > table.put in=None at=Authorization value=`auth`*
*headers = > table.put in=None at="Authorization" value=`auth`*
`messages` =
@@ -93,7 +93,7 @@ Wire body is `{model, messages:[{role,content}], stream?}`. Messages are an `@`
| self[^model] | `messages` |
1. `stream`
*req = > table.put in=`req` at=stream value=True*
*req = > table.put in=`req` at="stream" value=True*
*body = > json.stringify value=`req`*
*resp = > net.http_post_sse url=`url` body=`body` headers=`headers` echo=`echo`*
1. resp[^status] == 200
@@ -123,4 +123,4 @@ Wire body is `{model, messages:[{role,content}], stream?}`. Messages are an `@`
Alias for `complete`.
**> `self`.complete prompt=`prompt` stream=`stream` echo=`echo`**
**> self.complete prompt=`prompt` stream=`stream` echo=`echo`**
+9 -9
View File
@@ -39,23 +39,23 @@ import json:lib/json.mq.md
从 `OPENAI_*` / `MARQDO_LLM_*` 构造句柄。
*api_key = > 系统.取环境 名=OPENAI_API_KEY*
*api_key = > 系统.取环境 名="OPENAI_API_KEY"*
1. 非 `api_key`
*api_key = > 系统.取环境 名=MARQDO_LLM_API_KEY*
*api_key = > 系统.取环境 名="MARQDO_LLM_API_KEY"*
1. 非 `api_key`
> 打印 内容=ext/ai/大模型: 请设置 OPENAI_API_KEY 或 MARQDO_LLM_API_KEY
> 系统.退出 码=1
*base_url = > 系统.取环境 名=OPENAI_BASE_URL*
*base_url = > 系统.取环境 名="OPENAI_BASE_URL"*
1. 非 `base_url`
*base_url = > 系统.取环境 名=MARQDO_LLM_BASE_URL*
*base_url = > 系统.取环境 名="MARQDO_LLM_BASE_URL"*
1. 非 `base_url`
*base_url = "https://api.openai.com/v1"*
*model = > 系统.取环境 名=OPENAI_MODEL*
*model = > 系统.取环境 名="OPENAI_MODEL"*
1. 非 `model`
*model = > 系统.取环境 名=MARQDO_LLM_MODEL*
*model = > 系统.取环境 名="MARQDO_LLM_MODEL"*
1. 非 `model`
*model = "gpt-4o-mini"*
@@ -78,7 +78,7 @@ import json:lib/json.mq.md
*url = 自[^base_url] + 自[^suffix]*
*auth = 自[^bearer] + 自[^api_key]*
*headers = > 表.改 入=None 于=Authorization 值=`auth`*
*headers = > 表.改 入=None 于="Authorization" 值=`auth`*
`messages` =
@@ -93,7 +93,7 @@ import json:lib/json.mq.md
| 自[^model] | `messages` |
1. `流式`
*req = > 表.改 入=`req` 于=stream 值=True*
*req = > 表.改 入=`req` 于="stream" 值=True*
*body = > json.stringify value=`req`*
*resp = > 网络.提交流式 地址=`url` 内容=`body` headers=`headers` 打印增量=`打印增量`*
1. resp[^status] == 200
@@ -123,4 +123,4 @@ import json:lib/json.mq.md
运行 的别名。
**> `自`.运行 提示=`提示` 流式=`流式` 打印增量=`打印增量`**
**> 自.运行 提示=`提示` 流式=`流式` 打印增量=`打印增量`**
+100 -100
View File
@@ -16,32 +16,32 @@ import json:lib/json.mq.md
组装可读提示:站立提示、任务、工具、调用位置、源码、Skill,以及人可见的行动约定。
*`standing` = > json.get value=`智能体` key=standing *
*standing = > json.get value=`智能体` key="standing"*
1. `standing`
*`up` = `standing`*
*up = standing*
2. *
*`up` = 空*
*up = 空*
*`tools` = > json.get value=`智能体` key=tools *
*`tools_s` = > agent_format_tools tools=`tools` *
*`src` = > agent_module_source *
*`site` = > agent_call_site *
*`site_s` = > json.stringify value=`site` *
*`skill` = > agent_marqdo_skill *
*`task_s` = > json.stringify value=`任务` *
*tools = > json.get value=`智能体` key="tools"*
*tools_s = > agent_format_tools tools=`tools`*
*src = > agent_module_source*
*site = > agent_call_site*
*site_s = > json.stringify value=`site`*
*skill = > agent_marqdo_skill*
*task_s = > json.stringify value=`任务`*
*`esc` = > json.parse text={"a":"\n\n--- standing ---\n","b":"\n\n--- task ---\n","c":"\n\n--- tools ---\n","d":"\n\n--- call site ---\n","e":"\n\n--- source (.mq.md) ---\n","f":"\n\n--- marqdo skill ---\n","g":"\n\n--- how to act ---\nTools are ## functions in the source above. To call one, reply with exactly one line: CALL:<name>\n(Chinese ok: 调用:<name>)\nOtherwise reply with the final answer only.\nTools run via Marqdo subtask (spawn fn / wait).\n"} *
*`a` = > json.get value=`esc` key=a *
*`b` = > json.get value=`esc` key=b *
*`c` = > json.get value=`esc` key=c *
*`d` = > json.get value=`esc` key=d *
*`e` = > json.get value=`esc` key=e *
*`f` = > json.get value=`esc` key=f *
*`g` = > json.get value=`esc` key=g *
*esc = > json.parse text={"a":"\n\n--- standing ---\n","b":"\n\n--- task ---\n","c":"\n\n--- tools ---\n","d":"\n\n--- call site ---\n","e":"\n\n--- source (.mq.md) ---\n","f":"\n\n--- marqdo skill ---\n","g":"\n\n--- how to act ---\nTools are ## functions in the source above. To call one, reply with exactly one line: CALL:<name>\n(Chinese ok: 调用:<name>)\nOtherwise reply with the final answer only.\nTools run via Marqdo subtask (spawn fn / wait).\n"}*
*a = > json.get value=`esc` key="a"*
*b = > json.get value=`esc` key="b"*
*c = > json.get value=`esc` key="c"*
*d = > json.get value=`esc` key="d"*
*e = > json.get value=`esc` key="e"*
*f = > json.get value=`esc` key="f"*
*g = > json.get value=`esc` key="g"*
*`p` = "You are a Marqdo agent. The runbook source is your ground truth — code is documentation." *
*`p` = `p` + `a` + `up` + `b` + `task_s` + `c` + `tools_s` + `g` + `d` + `site_s` + `e` + `src` + `f` + `skill` *
**`p`**
*p = "You are a Marqdo agent. The runbook source is your ground truth — code is documentation."*
*p = p + a + up + b + task_s + c + tools_s + g + d + site_s + e + src + f + skill*
**p**
---
@@ -50,31 +50,31 @@ import json:lib/json.mq.md
解析人可读调用行:`CALL:<名>` 或 `调用:<名>` / `调用:<名>`。
*`esc` = > json.parse text={"nl":"\n"} *
*`nl` = > json.get value=`esc` key=nl *
*`text` = > trim value=`回复` *
*`lines` = > split value=`text` sep=`nl` *
*`found` = 空*
*esc = > json.parse text={"nl":"\n"}*
*nl = > json.get value=`esc` key="nl"*
*text = > trim value=`回复`*
*lines = > split value=`text` sep=`nl`*
*found = 空*
- [`line`](`lines`)
*`t` = > trim value=`line` *
*`parts` = > split value=`t` sep=: *
*`n` = > len value=`parts` *
*t = > trim value=`line`*
*parts = > split value=`t` sep=:*
*n = > len value=`parts`*
1. `n` > 1
*`head` = > at value=`parts` index=0 *
*`head` = > trim value=`head` *
*`rest` = > at value=`parts` index=1 *
*`rest` = > trim value=`rest` *
*head = > at value=`parts` index=0*
*head = > trim value=`head`*
*rest = > at value=`parts` index=1*
*rest = > trim value=`rest`*
1. `head` == CALL
*`found` = `rest`*
*found = rest*
2. `head` == 调用
*`found` = `rest`*
*found = rest*
3. *
*`_` = 1*
*_ = 1*
2. *
*`_` = 1*
*_ = 1*
**`found`**
**found**
---
@@ -84,13 +84,13 @@ import json:lib/json.mq.md
白名单校验后,经 `lib/子任务`(`启动 函数=` → `等待`)调用 runbook 中的 `##`。
*`allowed` = > agent_tool_allowed tools=`工具` name=`名` *
*allowed = > agent_tool_allowed tools=`工具` name=`名`*
1. `allowed`
*`id` = > 子任务.启动 函数=`名` *
*id = > 子任务.启动 函数=`名`*
**> 子任务.等待 id=`id`**
2. *
*`msg` = "Tool not allowed:" *
**`msg` + `名`**
*msg = "Tool not allowed:"*
**msg + `名`**
# 智能体
+ `大模型`
@@ -99,31 +99,31 @@ import json:lib/json.mq.md
加载 ABI v2 agent 插件(会话袋 + 上下文查询)。
*`p` = > 插件.原生路径 名=agent *
*p = > 插件.原生路径 名="agent"*
1. `p`
> 插件.加载 路径=`p`
2. *
> 打印 内容=ext/ai/智能体: 未找到原生 agent 插件(请先 cargo build -p marqdo_plugin_agent 或 marqdo ext add agent)
> 系统.退出 码=1
*`id` = > agent_alloc *
*`h` = > json.parse text={"_type":"智能体"} *
*`h` = > json.set map=`h` key=id value=`id` *
*`h` = > json.set map=`h` key=model value=`大模型` *
*`h` = > json.set map=`h` key=tools value=`工具` *
*id = > agent_alloc*
*h = > json.parse text={"_type":"智能体"}*
*h = > json.set map=`h` key="id" value=`id`*
*h = > json.set map=`h` key="model" value=`大模型`*
*h = > json.set map=`h` key="tools" value=`工具`*
1. `站立提示`
*`h` = > json.set map=`h` key=standing value=`站立提示` *
*h = > json.set map=`h` key="standing" value=`站立提示`*
2. *
*`_` = 1*
*_ = 1*
**`h`**
**h**
## 清空历史
清空本智能体 id 的插件会话袋。
*`id` = > json.get value=`自` key=id *
*id = > json.get value=`自` key="id"*
> agent_history_clear id=`id`
****
@@ -137,72 +137,72 @@ import json:lib/json.mq.md
流式=真 时走 SSE;打印增量=真 边读边打印。返回 map 仍是最终 result 文本。
*`ctx` = > 构建单步上下文 智能体=`自` 任务=`任务` *
*`id` = > json.get value=`自` key=id *
*`model` = > json.get value=`自` key=model *
*`tools` = > json.get value=`自` key=tools *
*ctx = > 构建单步上下文 智能体=`自` 任务=`任务`*
*id = > json.get value=`自` key="id"*
*model = > json.get value=`自` key="model"*
*tools = > json.get value=`自` key="tools"*
*`user_turn` = > json.parse text={"role":"user"} *
*`user_turn` = > json.set map=`user_turn` key=content value=`任务` *
*user_turn = > json.parse text={"role":"user"}*
*user_turn = > json.set map=`user_turn` key="content" value=`任务`*
> agent_history_append id=`id` item=`user_turn`
1. `流式`
*`evs` = > `model`.运行 提示=`ctx` 流式=真 打印增量=`打印增量` *
*`reply` = > 大模型.流式结果 事件=`evs` *
*evs = > model.运行 提示=`ctx` 流式=真 打印增量=`打印增量`*
*reply = > 大模型.流式结果 事件=`evs`*
2. *
*`reply` = > `model`.运行 提示=`ctx` *
*reply = > model.运行 提示=`ctx`*
*`reply` = > trim value=`reply` *
*`decision` = `reply`*
*`tool_name` = > 提取工具名 回复=`reply` *
*`out` = > json.parse text={"status":"ok"} *
*`out` = > json.set map=`out` key=task value=`任务` *
*`out` = > json.set map=`out` key=decision value=`decision` *
*reply = > trim value=`reply`*
*decision = reply*
*tool_name = > 提取工具名 回复=`reply`*
*out = > json.parse text={"status":"ok"}*
*out = > json.set map=`out` key="task" value=`任务`*
*out = > json.set map=`out` key="decision" value=`decision`*
1. `tool_name`
*`tool_out` = > 运行工具 工具=`tools` 名=`tool_name` *
*`tool_s` = > json.stringify value=`tool_out` *
*`deny` = > split value=`tool_s` sep=Tool not allowed *
*`deny_n` = > len value=`deny` *
*tool_out = > 运行工具 工具=`tools` 名=`tool_name`*
*tool_s = > json.stringify value=`tool_out`*
*deny = > split value=`tool_s` sep="Tool not allowed"*
*deny_n = > len value=`deny`*
1. `deny_n` > 1
*`out` = > json.set map=`out` key=status value=error *
*`out` = > json.set map=`out` key=error value=`tool_s` *
*`reply` = `tool_s`*
*out = > json.set map=`out` key="status" value="error"*
*out = > json.set map=`out` key="error" value=`tool_s`*
*reply = tool_s*
2. *
*`task_s` = > json.stringify value=`任务` *
*`fp` = "The user asked:" *
*`fp` = `fp` + `task_s` *
*`fp` = `fp` + ". Tool" *
*`fp` = `fp` + `tool_name` *
*`fp` = `fp` + "ran via subtask and returned:" *
*`fp` = `fp` + `tool_s` *
*`fp` = `fp` + ". Reply to the user briefly." *
*task_s = > json.stringify value=`任务`*
*fp = "The user asked:"*
*fp = fp + task_s*
*fp = fp + ". Tool"*
*fp = fp + tool_name*
*fp = fp + "ran via subtask and returned:"*
*fp = fp + tool_s*
*fp = fp + ". Reply to the user briefly."*
1. `流式`
*`evs2` = > `model`.运行 提示=`fp` 流式=真 打印增量=`打印增量` *
*`reply` = > 大模型.流式结果 事件=`evs2` *
*evs2 = > model.运行 提示=`fp` 流式=真 打印增量=`打印增量`*
*reply = > 大模型.流式结果 事件=`evs2`*
2. *
*`reply` = > `model`.运行 提示=`fp` *
*`out` = > json.set map=`out` key=tool value=`tool_name` *
*`out` = > json.set map=`out` key=tool_result value=`tool_s` *
*`out` = > json.set map=`out` key=result value=`reply` *
*reply = > model.运行 提示=`fp`*
*out = > json.set map=`out` key="tool" value=`tool_name`*
*out = > json.set map=`out` key="tool_result" value=`tool_s`*
*out = > json.set map=`out` key="result" value=`reply`*
2. *
*`out` = > json.set map=`out` key=result value=`reply` *
*out = > json.set map=`out` key="result" value=`reply`*
*`as_turn` = > json.parse text={"role":"assistant"} *
*`as_turn` = > json.set map=`as_turn` key=content value=`reply` *
*as_turn = > json.parse text={"role":"assistant"}*
*as_turn = > json.set map=`as_turn` key="content" value=`reply`*
> agent_history_append id=`id` item=`as_turn`
1. `写回`
*`body` = > json.stringify value=`out` *
*`st` = > json.get value=`out` key=status *
*body = > json.stringify value=`out`*
*st = > json.get value=`out` key="status"*
1. `st` == ok
> 自写回.写回 值=`body` 键=ok
2. *
> 自写回.写回 值=`body` 键=error
2. *
*`_` = 1*
*_ = 1*
**`out`**
**out**
## 多步
+ `目标`
@@ -228,8 +228,8 @@ import json:lib/json.mq.md
多步工作簿默认写入 OKF `知识库目录/resources/<slug>.mq.md`;仅当传入 `工作簿目录` 时才用临时 runs。转发至英文 `agent.plan`。`流式` / `打印增量` / `轨迹` 对应 `stream` / `echo` / `trace`;`软命中` → `soft_match`;`近义命中` / `近义阈值` → `near_match` / `near_threshold`。
*`model` = > json.get value=`self` key=model *
*`tools` = > json.get value=`self` key=tools *
*`standing` = > json.get value=`self` key=standing *
*`en` = > agent.agent model=`model` tools=`tools` standing=`standing` *
**> `en`.plan goal=`目标` workbook_dir=`工作簿目录` workbook=`工作簿` max_rounds=`最大轮次` confirm=`确认分解` writeback=`写回` skeleton=`骨架` reuse=`复用` optimize=`优化` force=`强制` soft_match=`软命中` near_match=`近义命中` near_threshold=`近义阈值` promote=`晋升` kb_dir=`知识库目录` improve_every=`改进周期` explore_n=`探索次数` stream=`流式` echo=`打印增量` trace=`轨迹`**
*model = > json.get value=`self` key="model"*
*tools = > json.get value=`self` key="tools"*
*standing = > json.get value=`self` key="standing"*
*en = > agent.agent model=`model` tools=`tools` standing=`standing`*
**> en.plan goal=`目标` workbook_dir=`工作簿目录` workbook=`工作簿` max_rounds=`最大轮次` confirm=`确认分解` writeback=`写回` skeleton=`骨架` reuse=`复用` optimize=`优化` force=`强制` soft_match=`软命中` near_match=`近义命中` near_threshold=`近义阈值` promote=`晋升` kb_dir=`知识库目录` improve_every=`改进周期` explore_n=`探索次数` stream=`流式` echo=`打印增量` trace=`轨迹`**
+1 -1
View File
@@ -10,7 +10,7 @@ import json:lib/json.mq.md
Load the ABI v2 `quantum` plugin once.
*`p` = > plugin.native_path name=quantum *
*p = > plugin.native_path name="quantum"*
1. `p`
> plugin.load path=`p`
2. *
+1 -1
View File
@@ -10,7 +10,7 @@ import json:lib/json.mq.md
加载 ABI v2 `quantum` 插件。
*`p` = > plugin.native_path name=quantum *
*p = > plugin.native_path name="quantum"*
1. `p`
> plugin.load path=`p`
2. *
+14 -14
View File
@@ -10,7 +10,7 @@ import json:lib/json.mq.md
Load the ABI v2 `web` plugin once.
*`p` = > plugin.native_path name=web *
*p = > plugin.native_path name="web"*
1. `p`
> plugin.load path=`p`
2. *
@@ -53,7 +53,7 @@ Embed a form into the page main slot. `listen` auto-registers `GET|POST /_form/{
Offline HTML for tests / previews.
1. `db`
*`url` = > json.get value=`db` key=url *
*url = > json.get value=`db` key="url"*
**> web_render page=`self` url=`url`**
2. *
**> web_render page=`self`**
@@ -63,14 +63,14 @@ Offline HTML for tests / previews.
Style tables live as `##` exports in site style modules; compose resolves them by path.
**`self`**
**self**
## process
+ `style`=None
+ `name`=None
+ `path`=None
**`self`**
**self**
# db
+ `url`="sqlite:site.db"
@@ -82,14 +82,14 @@ Style tables live as `##` exports in site style modules; compose resolves them b
+ `name`
+ `fields`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_init url=`url` name=`name` fields=`fields`**
## insert
+ `table`
+ `rows`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_insert url=`url` table=`table` rows=`rows`**
## select
@@ -99,15 +99,15 @@ Style tables live as `##` exports in site style modules; compose resolves them b
Simple filters: one-row map of column→value (AND `=`), or rows `|字段|操作|值|` (`=` `!=` `>` `>=` `<` `<=` `like`).
*`url` = > json.get value=`self` key=url *
*`r` = > web_db_select url=`url` table=`table` where=`where` limit=`limit` *
**> json.get value=`r` key=rows**
*url = > json.get value=`self` key="url"*
*r = > web_db_select url=`url` table=`table` where=`where` limit=`limit`*
**> json.get value=`r` key="rows"**
## get
+ `table`
+ `id`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_get url=`url` table=`table` id=`id`**
## update
@@ -115,21 +115,21 @@ Simple filters: one-row map of column→value (AND `=`), or rows `|字段|操作
+ `id`
+ `row`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_update url=`url` table=`table` id=`id` row=`row`**
## delete
+ `table`
+ `id`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_delete url=`url` table=`table` id=`id`**
## exec
+ `sql`
+ `args`=None
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_exec url=`url` sql=`sql` args=`args`**
# form
@@ -169,7 +169,7 @@ Field table + rules table; submit writes through `# db`.
+ `data`
+ `db`
*`url` = > json.get value=`db` key=url *
*url = > json.get value=`db` key="url"*
**> web_form_submit form=`self` data=`data` url=`url`**
# app
+14 -14
View File
@@ -10,7 +10,7 @@ import json:lib/json.mq.md
加载 ABI v2 `web` 插件。
*`p` = > plugin.native_path name=web *
*p = > plugin.native_path name="web"*
1. `p`
> plugin.load path=`p`
2. *
@@ -47,7 +47,7 @@ import json:lib/json.mq.md
+ `数据库`=None
1. `数据库`
*`url` = > json.get value=`数据库` key=url *
*url = > json.get value=`数据库` key="url"*
**> web_render page=`self` url=`url`**
2. *
**> web_render page=`self`**
@@ -55,14 +55,14 @@ import json:lib/json.mq.md
# 样式
+ `名`=""
**`self`**
**self**
## 样式处理
+ `样式`=None
+ `名`=None
+ `路径`=None
**`self`**
**self**
# 数据库
+ `地址`="sqlite:site.db"
@@ -74,14 +74,14 @@ import json:lib/json.mq.md
+ `名`
+ `字段`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_init url=`url` name=`名` fields=`字段`**
## 插入
+ `表`
+ `行`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_insert url=`url` table=`表` rows=`行`**
## 查询
@@ -91,15 +91,15 @@ import json:lib/json.mq.md
简单条件:单行列→值映射(AND `=`),或 `|字段|操作|值|` 表(`=` `!=` `>` `>=` `<` `<=` `like`)。
*`url` = > json.get value=`self` key=url *
*`r` = > web_db_select url=`url` table=`表` where=`条件` limit=`上限` *
**> json.get value=`r` key=rows**
*url = > json.get value=`self` key="url"*
*r = > web_db_select url=`url` table=`表` where=`条件` limit=`上限`*
**> json.get value=`r` key="rows"**
## 获取
+ `表`
+ `id`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_get url=`url` table=`表` id=`id`**
## 更新
@@ -107,21 +107,21 @@ import json:lib/json.mq.md
+ `id`
+ `行`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_update url=`url` table=`表` id=`id` row=`行`**
## 删除
+ `表`
+ `id`
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_delete url=`url` table=`表` id=`id`**
## 执行
+ `sql`
+ `参数`=None
*`url` = > json.get value=`self` key=url *
*url = > json.get value=`self` key="url"*
**> web_db_exec url=`url` sql=`sql` args=`参数`**
# 表单
@@ -161,7 +161,7 @@ import json:lib/json.mq.md
+ `数据`
+ `数据库`
*`url` = > json.get value=`数据库` key=url *
*url = > json.get value=`数据库` key="url"*
**> web_form_submit form=`self` data=`数据` url=`url`**
# 应用