Expand description
Tenant-scoped SQLite-backed TaskStore implementation.
Adds a tenant_id column to the tasks table for full tenant isolation
at the database level. Uses TenantContext to scope all operations.
Requires the sqlite feature flag.
§Schema
CREATE TABLE IF NOT EXISTS tenant_tasks (
tenant_id TEXT NOT NULL DEFAULT '',
id TEXT NOT NULL,
context_id TEXT NOT NULL,
state TEXT NOT NULL,
data TEXT NOT NULL,
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%d %H:%M:%f','now')),
PRIMARY KEY (tenant_id, id)
);list() returns tasks most-recently-updated first (spec §3.1.4) within the
current tenant, ordered by (updated_at DESC, id DESC) with a composite
row-value cursor. updated_at is written at millisecond precision.
Structs§
- Tenant
Aware Sqlite Task Store - Tenant-scoped SQLite-backed
TaskStore.