Skip to main content

Interface: TableData

Defined in: storage/table.ts:13

Loaded tabular data providing column-wise access

The items of a table are its rows, each of which annotates one item of another data object (see AnnotatedDataSource); the item IDs and names are those of the annotated items, in row order.

Extends

Properties

getNames?

optional getNames?: () => string[] | undefined

Defined in: storage/base.ts:63

Returns the item names if available, otherwise undefined

Optional: data types that never carry item names need not implement it.

The returned array is owned by this data object: callers must not modify it, and every call returns the very same array (see ItemsData).

Returns

string[] | undefined

The item names, or undefined if not available

Inherited from

ItemsData.getNames

Methods

close()

close(): void

Defined in: storage/base.ts:18

Releases all resources held by this data object

Returns

void

Inherited from

ItemsData.close


getIds()

getIds(): number[]

Defined in: storage/base.ts:44

Returns an array of item IDs

The returned array is owned by this data object: callers must not modify it, and every call returns the very same array (see ItemsData).

Returns

number[]

The item IDs

Inherited from

ItemsData.getIds


getSize()

getSize(): number

Defined in: storage/base.ts:51

Returns the total number of items

Returns

number

The item count

Inherited from

ItemsData.getSize


loadUniqueValues()

loadUniqueValues<T>(column, options?): Promise<GenericArray<T>>

Defined in: storage/table.ts:59

Loads a column's unique values as a typed array-like

Type Parameters

T

T

Element type of the returned array

Parameters

column

string

The column name

options?

Optional abort signal and progress callback

onProgress?

ProgressCallback

signal?

AbortSignal

Returns

Promise<GenericArray<T>>

The unique column values


loadValueRange()

loadValueRange(column, options?): Promise<[number, number] | undefined>

Defined in: storage/table.ts:71

Loads a column's minimum and maximum values

Parameters

column

string

The column name

options?

Optional abort signal and progress callback

onProgress?

ProgressCallback

signal?

AbortSignal

Returns

Promise<[number, number] | undefined>

The numeric [min, max] value range of the column, or undefined if not numeric


loadValues()

loadValues<T>(column, options?): Promise<GenericArray<T>>

Defined in: storage/table.ts:46

Loads a column's values as a typed array-like

Type Parameters

T

T

Element type of the returned array

Parameters

column

string

The column name

options?

Optional abort signal and progress callback

onProgress?

ProgressCallback

signal?

AbortSignal

Returns

Promise<GenericArray<T>>

The column values


resolveColumnQuery()

resolveColumnQuery(query, options?): Promise<string | null>

Defined in: storage/table.ts:33

Resolves a query to an exact column name

Parameters

query

string

The column query

options?

Optional abort signal

signal?

AbortSignal

Returns

Promise<string | null>

The resolved column name, or null if no match is found


suggestColumnQueries()

suggestColumnQueries(currentQuery, options?): Promise<string[]>

Defined in: storage/table.ts:21

Returns column name suggestions matching the current query

Parameters

currentQuery

string

The partial column name to autocomplete

options?

Optional abort signal

signal?

AbortSignal

Returns

Promise<string[]>

A list of suggested column queries matching the current one