Opens durable SQLite storage for Cloudflare Durable Objects.
// Source: https://github.com/badlogic/pi-mono | License: MIT | Copyright 2025 Mario Zechner
// Provided via justclaw.it.com; keep this notice with the code.
import { DurableObjectSqliteDatabase, type DurableObjectSqliteStorage } from "@earendil-works/chord/sqlite/cloudflare";
import { SqliteStorage, type SqliteStorageOptions } from "./storage.ts";
export { DurableObjectSqliteDatabase, type DurableObjectSqliteStorage } from "@earendil-works/chord/sqlite/cloudflare";
/**
* Open durable storage on a SQLite-backed Durable Object, optionally under a table prefix. Calls given the same
* storage object share an operation queue.
*/
export function openDurableObjectSqliteStorage(
storage: DurableObjectSqliteStorage,
options: SqliteStorageOptions = {},
): Promise<SqliteStorage> {
return Sql
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key