一键导入
database
Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run Unix commands and structured filesystem ops from the iii engine: exec, background jobs, and a structured fs (ls/stat/mkdir/rm/chmod/mv/grep/sed/ read/write, jailed only if fs.host_roots is configured), all forwardable into a sandbox microVM.
Shared, adapter-backed key/value store addressed by scope and key, with a reactive `state` trigger so other functions can run on every create, update, or delete without polling.
Durable topic queues for iii: subscribe functions to topics, publish work asynchronously, retry failed deliveries with backoff, and inspect/redrive dead-lettered messages.
Mint isolated git worktrees for parallel agent work, track ownership in a cross-agent registry, and land finished branches back onto a target with a queued rebase, test gate, and atomic fast-forward merge.
Connect this engine to another iii engine over a long-lived WebSocket so functions call across the boundary. Wire stable ids with `forward:`/`expose:`; `bridge.invoke` is the ad-hoc escape hatch.
Drive Devin over the iii bus. Run the local Devin CLI agent (SWE-1.6) with the iii runtime context so it discovers and operates your mesh, or start and steer autonomous Devin cloud sessions through the REST API, with a passthrough to any Devin v1/v3 endpoint.
| name | database |
| description | Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools. |
The database worker connects to PostgreSQL, MySQL, and SQLite through a
managed per-database connection pool. Every callable surface lives under
the database::* namespace. The driver is chosen from each database URL
scheme (sqlite:, postgres://, postgresql://, mysql://).
Runtime settings live in the configuration worker under id database;
pools hot-reload when the value changes. SQLite is the recommended starting
point. Placeholder syntax: ? for SQLite and MySQL, $1/$2/… for Postgres.
database::query).database::execute).database::transaction or the interactive transaction surface).database::prepareStatement +
database::runStatement).database::beginTransaction … commitTransaction / rollbackTransaction).database::row-change trigger — see below).database::row-change only for Postgres
table change feeds, not for application events.database::query is read-oriented; use database::execute for writes.
Running a SELECT through execute discards rows.database::transaction needs every statement up front; use the
interactive surface when code must branch between steps.returning option on execute (warn-once). SQLite
degrades read_committed / repeatable_read isolation to serializable.shell worker instead.database::query — run read-only SQL and return rows, row count, and
column metadata.database::execute — run write SQL (INSERT/UPDATE/DELETE/DDL) and
return affected rows, optional last insert id, and optional RETURNING rows.database::prepareStatement — parse and plan SQL once; return a handle
that pins a pool connection until TTL expiry.database::runStatement — re-execute a prepared handle with new bind
params; response shape matches query.database::transaction — run an ordered batch of statements atomically;
rolls back on first failure and reports failed_index.database::beginTransaction — open an interactive transaction and
return an id plus expiry deadline.database::transactionQuery — read SQL inside an open interactive
transaction; same envelope as query.database::transactionExecute — write SQL inside an open interactive
transaction; same envelope as execute. Rejects bare transaction-control
SQL — finalize via commitTransaction or rollbackTransaction.database::commitTransaction — commit and finalize an interactive
transaction.database::rollbackTransaction — roll back and finalize an interactive
transaction.database::listDatabases — list every configured database with its
driver, credential-redacted connection URL, pool settings, and TLS mode.
Config details only; no health checks or live pool statistics.Interactive transactions auto-roll back when timeout_ms elapses (default
30 s, max 5 min). Prepared handles default to a 1 h TTL (max 24 h) with no
explicit release call — let them expire or stop using them when done.
Register a database::row-change trigger when a function should run
automatically on Postgres INSERT/UPDATE/DELETE for specific tables — without
polling with database::query.
Reach for it when:
Do not bind when:
execute or transactionExecute
return payload.UNSUPPORTED on registerTrigger
pending an upstream tokio-postgres replication API release.registerFunction('stream::on-row-change', handler).iii.registerTrigger({
type: 'database::row-change',
function_id: 'stream::on-row-change',
config: {
db: 'primary',
schema: 'public',
tables: ['orders', 'payments'],
// optional: slot_name, publication_name — see get function info
},
})
Config: db, schema (default public), tables. Slot/publication names
derive from trigger_id unless overridden. For event payload shape, call
get function info on the trigger type or handler function id.