import type * as cf from "@cloudflare/workers-types";
import * as Effect from "effect/Effect";
import * as Stream from "effect/Stream";
import type { RuntimeContext } from "../../RuntimeContext.ts";
declare const DurableObjectStorageError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "DurableObjectStorageError";
} & Readonly;
/** A native transaction failure or invalid use of a transaction's owner. */
export declare class DurableObjectStorageError extends DurableObjectStorageError_base<{
readonly operation: string;
readonly message: string;
readonly cause?: unknown;
}> {
}
export type SqlStorageValue = cf.SqlStorageValue;
export interface SqlCursor> extends Stream.Stream {
next(): Effect.Effect<{
done?: false;
value: T;
} | {
done: true;
value?: never;
}, never, RuntimeContext>;
toArray(): Effect.Effect;
one(): Effect.Effect;
raw(): Stream.Stream;
readonly columnNames: string[];
readonly rowsRead: Effect.Effect;
readonly rowsWritten: Effect.Effect;
}
export interface SqlStorage {
/**
* The raw underlying Cloudflare SqlStorage binding.
*
* Use this when you need direct access for libraries that already support
* Cloudflare Durable Object SQLite storage.
*/
readonly raw: cf.SqlStorage;
exec>(query: string, ...bindings: any[]): Effect.Effect, never, RuntimeContext>;
readonly databaseSize: number;
}
export interface DurableObjectTransaction {
get(key: string, options?: cf.DurableObjectGetOptions): Effect.Effect;
get(keys: string[], options?: cf.DurableObjectGetOptions): Effect.Effect