pond-ts API Reference (core)
    Preparing search index...

    Class StringColumn

    Single class covering both dictionary-encoded and fallback string columns. dictionary / indices populated iff dict-encoded; fallback populated otherwise. Exactly one mode is active per instance.

    Index

    Constructors

    • Private. Construct via stringColumnDictEncoded, stringColumnFallback, or the higher-level stringColumnFromArray. Validates that exactly one of the two storage modes is populated.

      Parameters

      • length: number
      • options: {
            dictionary?: readonly string[];
            fallback?: readonly (string | undefined)[];
            indices?: Int32Array<ArrayBufferLike>;
            validity?: ValidityBitmap;
        }

      Returns StringColumn

    Properties

    dictionary?: readonly string[]
    fallback?: readonly (string | undefined)[]
    indices?: Int32Array<ArrayBufferLike>
    kind: "string" = ...
    length: number
    storage: "packed" = ...
    validity?: ValidityBitmap

    Accessors

    Methods

    • Linear scan with callback. Matches the shared ColumnBase scan contract:

      • skipInvalid: true (default): callback fired only for rows the validity bitmap marks as defined.
      • skipInvalid: false: callback fired for every row in [0, length), mirroring Float64Column and BooleanColumn. Invalid rows whose effective value would otherwise be undefined receive the empty-string sentinel '', the string equivalent of the numeric columns' buffer-default sentinel (0 for Float64Column, false for BooleanColumn). Callers who must distinguish a real '' from a sentinel '' consult column.validity directly — identical pattern to the numeric columns' 0 sentinel.

      Parameters

      • fn: (value: string, i: number) => void
      • Optionaloptions: ScanOptions

      Returns void

    • Returns a column whose row i is this column's row indices[i]. Dict-encoded: gathers Int32 indices, dictionary shared. Fallback: gathers strings into a new array.

      Dictionary retention. The output keeps the full source dictionary even if some entries are no longer referenced. A future compactDictionary op (deferred until a use case justifies it) trims unused entries.

      Parameters

      • sourceRowIndices: Int32Array

      Returns StringColumn