#Type Alias: TxStep
type TxStep =
| {
op: "query";
table: string;
opts?: QueryOptions;
}
| {
op: "get";
table: string;
id: Primitive;
}
| {
op: "insert";
table: string;
row: Record<string, unknown>;
}
| {
op: "update";
table: string;
id: Primitive;
patch: Record<string, unknown>;
}
| {
op: "delete";
table: string;
id: Primitive;
hard?: boolean;
}
| {
op: "audit";
table: string;
rowId: Primitive;
action: string;
data?: Record<string, unknown>;
}
| {
op: "service";
name: string;
input: Record<string, unknown>;
};Defined in: sapi/db/types.ts:88
批量事务单步操作(也用于交互式 tx step)。