Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

builderThroughAsyncIterable

  • builderThroughAsyncIterable<T, TNull>(options: IterableBuilderOptions<T, TNull>): ThroughAsyncIterable<T, TNull>
  • Transform an AsyncIterable of arbitrary JavaScript values into a sequence of Arrow Vector following the chunking semantics defined in the supplied options argument.

    This function returns a function that accepts an AsyncIterable of values to transform. When called, this function returns an AsyncIterator of Vector<T>.

    The resulting AsyncIterator<Vector<T>> yields Vectors based on the queueingStrategy and highWaterMark specified in the options argument.

    • If queueingStrategy is "count" (or omitted), The AsyncIterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once the Builder's length reaches or exceeds the supplied highWaterMark.
    • If queueingStrategy is "bytes", the AsyncIterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once its byteLength reaches or exceeds the supplied highWaterMark.
    nocollapse

    Type parameters

    Parameters

    • options: IterableBuilderOptions<T, TNull>

      An object of properties which determine the Builder to create and the chunking semantics to use.

    Returns ThroughAsyncIterable<T, TNull>

    A function which accepts a JavaScript AsyncIterable of values to write, and returns an AsyncIterator that yields Vectors according to the chunking semantics defined in the options argument.

builderThroughIterable

  • builderThroughIterable<T, TNull>(options: IterableBuilderOptions<T, TNull>): ThroughIterable<T, TNull>
  • Transform a synchronous Iterable of arbitrary JavaScript values into a sequence of Arrow Vector following the chunking semantics defined in the supplied options argument.

    This function returns a function that accepts an Iterable of values to transform. When called, this function returns an Iterator of Vector<T>.

    The resulting Iterator<Vector<T>> yields Vectors based on the queueingStrategy and highWaterMark specified in the options argument.

    • If queueingStrategy is "count" (or omitted), The Iterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once the Builder's length reaches or exceeds the supplied highWaterMark.
    • If queueingStrategy is "bytes", the Iterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once its byteLength reaches or exceeds the supplied highWaterMark.
    nocollapse

    Type parameters

    Parameters

    • options: IterableBuilderOptions<T, TNull>

      An object of properties which determine the Builder to create and the chunking semantics to use.

    Returns ThroughIterable<T, TNull>

    A function which accepts a JavaScript Iterable of values to write, and returns an Iterator that yields Vectors according to the chunking semantics defined in the options argument.

makeBuilder

  • makeBuilder<T, TNull>(options: BuilderOptions<T, TNull>): BuilderType<T, TNull>
  • Type parameters

    Parameters

    • options: BuilderOptions<T, TNull>

    Returns BuilderType<T, TNull>

makeData

  • makeData<T>(props: NullDataProps<T>): Data<T>
  • makeData<T>(props: IntDataProps<T>): Data<T>
  • makeData<T>(props: DictionaryDataProps<T>): Data<T>
  • makeData<T>(props: FloatDataProps<T>): Data<T>
  • makeData<T>(props: BoolDataProps<T>): Data<T>
  • makeData<T>(props: DecimalDataProps<T>): Data<T>
  • makeData<T>(props: Date_DataProps<T>): Data<T>
  • makeData<T>(props: TimeDataProps<T>): Data<T>
  • makeData<T>(props: TimestampDataProps<T>): Data<T>
  • makeData<T>(props: IntervalDataProps<T>): Data<T>
  • makeData<T>(props: FixedSizeBinaryDataProps<T>): Data<T>
  • makeData<T>(props: BinaryDataProps<T>): Data<T>
  • makeData<T>(props: Utf8DataProps<T>): Data<T>
  • makeData<T>(props: ListDataProps<T>): Data<T>
  • makeData<T>(props: FixedSizeListDataProps<T>): Data<T>
  • makeData<T>(props: StructDataProps<T>): Data<T>
  • makeData<T>(props: Map_DataProps<T>): Data<T>
  • makeData<T>(props: SparseUnionDataProps<T>): Data<T>
  • makeData<T>(props: DenseUnionDataProps<T>): Data<T>
  • makeData<T>(props: UnionDataProps<T>): Data<T>
  • makeData<T>(props: DataProps_<T>): Data<T>
  • Type parameters

    • T: Null<T>

    Parameters

    • props: NullDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Int_<Ints, T>

    Parameters

    • props: IntDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Dictionary<any, TKeys, T>

    Parameters

    • props: DictionaryDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Float<Floats, T>

    Parameters

    • props: FloatDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Bool<T>

    Parameters

    • props: BoolDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Decimal<T>

    Parameters

    • props: DecimalDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Date_<Dates, T>

    Parameters

    • props: Date_DataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Time_<Times, T>

    Parameters

    • props: TimeDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Timestamp_<Timestamps, T>

    Parameters

    • props: TimestampDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Interval_<Intervals, T>

    Parameters

    • props: IntervalDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: FixedSizeBinary<T>

    Parameters

    • props: FixedSizeBinaryDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Binary<T>

    Parameters

    • props: BinaryDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Utf8<T>

    Parameters

    • props: Utf8DataProps<T>

    Returns Data<T>

  • Type parameters

    • T: List<any, T>

    Parameters

    • props: ListDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: FixedSizeList<any, T>

    Parameters

    • props: FixedSizeListDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Struct<any, T>

    Parameters

    • props: StructDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Map_<any, any, T>

    Parameters

    • props: Map_DataProps<T>

    Returns Data<T>

  • Type parameters

    • T: SparseUnion<T>

    Parameters

    • props: SparseUnionDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: DenseUnion<T>

    Parameters

    • props: DenseUnionDataProps<T>

    Returns Data<T>

  • Type parameters

    • T: Union_<Unions, T>

    Parameters

    • props: UnionDataProps<T>

    Returns Data<T>

  • Type parameters

    Parameters

    • props: DataProps_<T>

    Returns Data<T>

makeTable

  • makeTable<I>(input: I): Table<{ [ P in keyof I]: TypedArrayDataType<I[P]> }>
  • Creates a new Table from an object of typed arrays.

    example
    const table = makeTable({
    a: new Int8Array([1, 2, 3]),
    })

    Type parameters

    • I: Record<string | number | symbol, TypedArray>

    Parameters

    • input: I

      Input an object of typed arrays.

    Returns Table<{ [ P in keyof I]: TypedArrayDataType<I[P]> }>

    A new Table.

makeVector

  • makeVector<T>(data: T | readonly T[]): Vector<TypedArrayDataType<T>>
  • makeVector<T>(data: T | readonly T[]): Vector<dtypes.Int8>
  • makeVector<T>(data: Data<T> | readonly Data<T>[]): Vector<T>
  • makeVector<T>(data: Vector<T> | readonly Vector<T>[]): Vector<T>
  • makeVector<T>(data: DataProps<T> | readonly DataProps<T>[]): Vector<T>

tableFromArrays

  • tableFromArrays<I>(input: I): Table<{ [ P in keyof I]: ArrayDataType<I[P]> }>
  • Creates a new Table from an object of typed arrays or JavaScript arrays.

    example
    const table = tableFromArrays({
    a: [1, 2, 3],
    b: new Int8Array([1, 2, 3]),
    })

    Type parameters

    • I: Record<string | number | symbol, TypedArray | BigIntArray | readonly unknown[]>

    Parameters

    • input: I

    Returns Table<{ [ P in keyof I]: ArrayDataType<I[P]> }>

    A new Table.

tableFromIPC

  • tableFromIPC<T>(source: ArrowJSONLike | FromArg2): Table<T>
  • tableFromIPC<T>(source: FromArg1): Promise<Table<T>>
  • tableFromIPC<T>(source: FromArg3 | FromArg4 | FromArg5): Promise<Table<T>> | Table<T>

tableToIPC

  • tableToIPC<T>(table: Table<any>, type?: "file" | "stream"): Uint8Array
  • Serialize a Table to the IPC format. This function is a convenience wrapper for {@link RecordBatchStreamWriter} and {@link RecordBatchFileWriter}. Opposite of tableFromIPC.

    Type parameters

    • T: TypeMap = any

    Parameters

    • table: Table<any>

      The Table to serialize.

    • type: "file" | "stream" = 'stream'

      Whether to serialize the Table as a file or a stream.

    Returns Uint8Array

vectorFromArray

  • vectorFromArray(values: readonly (undefined | null)[], type?: Null): Vector<dtypes.Null>
  • vectorFromArray(values: readonly (undefined | null | boolean)[], type?: Bool): Vector<dtypes.Bool>
  • vectorFromArray<T>(values: readonly (undefined | null | string)[], type?: T): Vector<T>
  • vectorFromArray<T>(values: readonly (undefined | null | Date)[], type?: T): Vector<T>
  • vectorFromArray<T>(values: readonly (undefined | null | number)[], type: T): Vector<T>
  • vectorFromArray<T>(values: readonly (undefined | null | bigint)[], type?: T): Vector<T>
  • vectorFromArray<T>(values: readonly (undefined | null | number)[], type?: T): Vector<T>
  • vectorFromArray<T>(values: readonly unknown[], type: T): Vector<T>
  • vectorFromArray<T>(values: T): Vector<JavaScriptArrayDataType<T>>
  • vectorFromArray<T>(data: T): Vector<TypedArrayDataType<T>>
  • vectorFromArray<T>(data: Data<T>): Vector<T>
  • vectorFromArray<T>(data: Vector<T>): Vector<T>
  • vectorFromArray<T>(data: DataProps<T>): Vector<T>
  • vectorFromArray<T>(data: T): Vector<ArrayDataType<T>>
  • Creates a Vector from a JavaScript array via a Builder. Use makeVector if you only want to create a vector from a typed array.

    example
    const vf64 = vectorFromArray([1, 2, 3]);
    const vi8 = vectorFromArray([1, 2, 3], new Int8);
    const vdict = vectorFromArray(['foo', 'bar']);

    Parameters

    • values: readonly (undefined | null)[]
    • Optional type: Null

    Returns Vector<dtypes.Null>

  • Parameters

    • values: readonly (undefined | null | boolean)[]
    • Optional type: Bool

    Returns Vector<dtypes.Bool>

  • Type parameters

    • T: Utf8 | Dictionary<Utf8, TKeys> = Dictionary<Utf8, Int32>

    Parameters

    • values: readonly (undefined | null | string)[]
    • Optional type: T

    Returns Vector<T>

  • Type parameters

    • T: Date_<Dates, T>

    Parameters

    • values: readonly (undefined | null | Date)[]
    • Optional type: T

    Returns Vector<T>

  • Type parameters

    • T: Int_<Ints, T>

    Parameters

    • values: readonly (undefined | null | number)[]
    • type: T

    Returns Vector<T>

  • Type parameters

    • T: Int64 | Uint64 = Int64

    Parameters

    • values: readonly (undefined | null | bigint)[]
    • Optional type: T

    Returns Vector<T>

  • Type parameters

    • T: Float<Floats, T> = Float64

    Parameters

    • values: readonly (undefined | null | number)[]
    • Optional type: T

    Returns Vector<T>

  • Type parameters

    Parameters

    • values: readonly unknown[]
    • type: T

    Returns Vector<T>

  • Type parameters

    • T: readonly unknown[]

    Parameters

    • values: T

    Returns Vector<JavaScriptArrayDataType<T>>

  • Creates a Vector from a typed array via makeVector.

    Type parameters

    • T: TypedArray | BigIntArray

    Parameters

    • data: T

    Returns Vector<TypedArrayDataType<T>>

  • Type parameters

    Parameters

    Returns Vector<T>

  • Type parameters

    Parameters

    Returns Vector<T>

  • Type parameters

    Parameters

    • data: DataProps<T>

    Returns Vector<T>

  • Type parameters

    • T: TypedArray | BigIntArray | readonly unknown[]

    Parameters

    • data: T

    Returns Vector<ArrayDataType<T>>

Generated using TypeDoc