Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T: Row

Hierarchy

  • Table

Index

Constructors

constructor

  • new Table(data: DataTable<T>, key: string, options?: { context?: undefined | string; contextChanges?: Array<ContextChanges<T>> }): Table
  • Parameters

    • data: DataTable<T>
    • key: string
    • Default value options: { context?: undefined | string; contextChanges?: Array<ContextChanges<T>> } = {}
      • Optional context?: undefined | string
      • Optional contextChanges?: Array<ContextChanges<T>>

    Returns Table

Properties

Private Optional context

context: undefined | string

Private Optional contextChanges

contextChanges: Array<ContextChanges<T>>

Private data

data: DataTable<T>

Private key

key: string

Accessors

all

  • get all(): T[]

changes

  • get changes(): Array<ObjectChanges<T>>

Private deletedIds

  • get deletedIds(): string[]

first

  • get first(): T | undefined

ids

  • get ids(): string[]

last

  • get last(): T | undefined

length

  • get length(): number

name

  • get name(): string

Private newIds

  • get newIds(): string[]

Methods

changesFor

  • changesFor(id: string): ObjectChanges<T> | undefined
  • Parameters

    • id: string

    Returns ObjectChanges<T> | undefined

commit

  • commit(ids?: RowIdentififying): CommitContextAction
  • Parameters

    • Optional ids: RowIdentififying

    Returns CommitContextAction

delete

  • delete(id: RowIdentififying): DeleteAction
  • Parameters

    • id: RowIdentififying

    Returns DeleteAction

find

  • find(id: string): T | undefined
  • Parameters

    • id: string

    Returns T | undefined

insert

  • insert(records: RowInsertionList<T>): InsertAction
  • Parameters

    • records: RowInsertionList<T>

    Returns InsertAction

reset

  • reset(): ResetAction

revert

  • revert(ids?: RowIdentififying): RevertContextAction
  • Parameters

    • Optional ids: RowIdentififying

    Returns RevertContextAction

truncate

  • truncate(): TruncateAction

update

  • update(id: RowIdentififying, values: Partial<T>): UpdateAction
  • Parameters

    • id: RowIdentififying
    • values: Partial<T>

    Returns UpdateAction

upsert

  • upsert(records: RowInsertionList<T>): UpsertAction
  • Parameters

    • records: RowInsertionList<T>

    Returns UpsertAction

where

  • where(query: ((value: T) => boolean) | Partial<T>): T[]
  • Parameters

    • query: ((value: T) => boolean) | Partial<T>

    Returns T[]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc