arlas-wui-toolkit / Exports / ArlasLocalDatabase

Class: ArlasLocalDatabase<T>

Type parameters

Name Type
T extends ArlasStorageObject

Hierarchy

  • ArlasLocalDatabase

BookmarkLocalDatabase

AoiDatabase

ExtendLocalDatabase

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ArlasLocalDatabase<T>(storageKey?, additionalObject?)

Type parameters

Name Type
T extends ArlasStorageObject

Parameters

Name Type Default value
storageKey string 'storage_object'
additionalObject? any undefined

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:34

Properties

dataChange

dataChange: BehaviorSubject<T[]>

Stream that emits whenever the data has been modified.

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:26


storageKey

storageKey: string

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:32


storageObjectMap

storageObjectMap: Map<string, T>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:30

Accessors

data

get data(): T[]

Returns

T[]

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:27

Methods

add

add(storageObject): Observable<void>

Parameters

Name Type
storageObject T

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:58


init

init(obj, additionnalObj?): T

Method call for each element at init

Parameters

Name Type Description
obj T Object to init of type
additionnalObj? any Addtionnal object

Returns

T

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:54


remove

remove(id): Observable<void>

Parameters

Name Type
id string

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:69


update

update(id, storageObject): Observable<void>

Parameters

Name Type
id string
storageObject T

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasLocalDatabase.ts:85