Skip to content

Type Alias: BlobReadAheadOption ​

ts
type BlobReadAheadOption = 
  | boolean
  | number
  | {
  columns?: string[];
  depth?: number;
  maxBytes?: number;
};

Defined in: packages/core/src/api/options.ts:56

Read-ahead for LAZY blobs in queryStream: while the consumer processes row N, the driver prefetches upcoming rows' blob contents in background op-lock slices, so .buffer()/.text()/.stream() resolve without wire round trips. Purely an optimization — skipped rows, out-of-order reads, or budget-exceeding blobs silently fall back to the on-demand path.

  • true → depth 1, all lazy blob columns
  • n → depth n
  • { columns?, depth?, maxBytes? } — restrict to named columns; maxBytes bounds prefetched-but-unconsumed memory per stream (default 16 MiB; may overshoot by at most one blob since sizes aren't known upfront).
  • false → disabled (overrides a connection-level default)

MIT Licensed. Contains data derived from the Firebird project under IDPL/IPL.