drupflare/worker - v1.0.0
    Preparing search index...

    Interface HeapSql

    The ctx.storage.sql surface this module needs, and nothing wider.

    Narrow: it makes the read/write path drivable from a unit test with a fake, which is the only way to test a Durable Object's storage without a Durable Object.

    interface HeapSql {
        exec(
            query: string,
            ...bindings: (
                string
                | number
                | bigint
                | Uint8Array<ArrayBufferLike>
                | null
            )[],
        ): {
            "[iterator]"(): Iterator<Record<string, unknown>>;
            toArray(): Record<string, unknown>[];
        };
    }
    Index
    • Parameters

      • query: string
      • ...bindings: (string | number | bigint | Uint8Array<ArrayBufferLike> | null)[]

      Returns {
          "[iterator]"(): Iterator<Record<string, unknown>>;
          toArray(): Record<string, unknown>[];
      }