columna API reference - v0.4.0
    Preparing search index...

    Interface SessionOptions

    A Session bundles the three pieces of state that are otherwise process-wide — the execution runtime (engine, strictness, memory policy), the persist() cache and the IO policy — into one object a server can create per tenant, per request or per test. Nothing a session does is visible to another session or to the process defaults: its frames run on its own Runtime, persist() fills its own PersistCache, and every read it performs must pass its IO policy in addition to the process floor from setIoPolicy().

    const tenant = createSession({
    io: { allowedHosts: ['data.acme.example'], denyPrivateHosts: true, maxBytes: 200e6, timeoutMs: 30_000 },
    runtime: { engine: 'cpu', strict: true, memory: { maxBytes: 512 * 1024 * 1024 } },
    persist: { maxBytes: 128 * 1024 * 1024 },
    })
    const orders = await tenant.readCsv({ url: 'https://data.acme.example/orders.csv' })
    const top = await orders.lazy().groupBy('country').agg({ r: col('revenue').sum() }).persist().collect()
    tenant.close() // drops the session's cache
    interface SessionOptions {
        backends?: Backend[];
        io?: IoPolicy;
        persist?: false | PersistCache | PersistCacheOptions;
        runtime?: Omit<RuntimeOptions, "persist">;
    }
    Index
    backends?: Backend[]

    Accelerator backends for the session's runtime. Default: whatever the process default runtime has registered (the columna entry registers WASM and WebGPU there), so a session sees the same engines. Pass [] for a CPU-only session.

    IO policy every read of this session must pass (a floor on top of setIoPolicy(), narrowed by per-call options).

    persist?: false | PersistCache | PersistCacheOptions

    The session's own persist() cache; false shares the process-wide cache.

    runtime?: Omit<RuntimeOptions, "persist">

    Engine, strictness, thresholds and memory policy of the session's runtime.