Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Index

Hierarchy

  • Index

Implements

Index

Constructors

constructor

Properties

Private avl

avl: AVLTree

ALV Tree for indexing

Private datastore

datastore: Datastore

Reference to Datastore

Protected fieldName

fieldName: string

Field Name for Index

Private isArray

isArray: boolean

Is the index holding an array

Methods

insert

  • insert(doc: any): Promise<any>
  • Insert document into Index

    Parameters

    • doc: any

      document to insert into Index

    Returns Promise<any>

insertMany

  • insertMany(key: ASNDBS, indices: any[]): Promise<null>
  • Inserts many documents and updates the indices

    Parameters

    • key: ASNDBS
    • indices: any[]

    Returns Promise<null>

remove

  • remove(doc: any): Promise<any>

search

  • search(key: ASNDBS): Promise<SNDBSA>

searchRange

  • searchRange(range: IRange): Promise<SNDBSA>

toJSON

  • toJSON(): Promise<string>
  • Return the tree as JSON [{ key, value }, ...] pairs.

    Returns Promise<string>

updateKey

  • updateKey(key: ASNDBS, newKey: ASNDBS): Promise<null>
  • Update a key of a tree

    • keys are actually the value, in the tree the keys are values of the to be updated document while the value in the tree is the _id of the to be updated document.

    Parameters

    • key: ASNDBS
    • newKey: ASNDBS

    Returns Promise<null>

Generated using TypeDoc