Skip to content

datastore

ralphhanna edited this page Dec 18, 2023 · 3 revisions

bpmn-server / DataStore

Class: DataStore

super class for various objects that are part of the server

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new DataStore(server): DataStore

Parameters

Name Type
server IBPMNServer

Returns

DataStore

Overrides

ServerComponent.constructor

Defined in

datastore/DataStore.ts:33

Properties

db

db: any

Implementation of

IDataStore.db

Defined in

datastore/DataStore.ts:24


dbConfiguration

dbConfiguration: any

Implementation of

IDataStore.dbConfiguration

Defined in

datastore/DataStore.ts:23


execution

execution: Execution

Defined in

datastore/DataStore.ts:26


inSaving

inSaving: boolean = false

Defined in

datastore/DataStore.ts:29


isModified

isModified: boolean = false

Defined in

datastore/DataStore.ts:27


isRunning

isRunning: boolean = false

Defined in

datastore/DataStore.ts:28


locker

locker: any

Implementation of

IDataStore.locker

Defined in

datastore/DataStore.ts:31


promises

promises: any[] = []

Defined in

datastore/DataStore.ts:30


server

server: any

Inherited from

ServerComponent.server

Defined in

server/ServerComponent.ts:9


seq

Static seq: number = 0

Defined in

datastore/DataStore.ts:89

Accessors

appDelegate

get appDelegate(): any

Returns

any

Inherited from

ServerComponent.appDelegate

Defined in

server/ServerComponent.ts:18


cache

get cache(): CacheManager

Returns

CacheManager

Inherited from

ServerComponent.cache

Defined in

server/ServerComponent.ts:17


configuration

get configuration(): any

Returns

any

Inherited from

ServerComponent.configuration

Defined in

server/ServerComponent.ts:14


cron

get cron(): Cron

Returns

Cron

Inherited from

ServerComponent.cron

Defined in

server/ServerComponent.ts:16


dataStore

get dataStore(): any

Returns

any

Inherited from

ServerComponent.dataStore

Defined in

server/ServerComponent.ts:20


definitions

get definitions(): any

Returns

any

Inherited from

ServerComponent.definitions

Defined in

server/ServerComponent.ts:21


engine

get engine(): IEngine

Returns

IEngine

Inherited from

ServerComponent.engine

Defined in

server/ServerComponent.ts:19


listener

get listener(): any

Returns

any

Inherited from

ServerComponent.listener

Defined in

server/ServerComponent.ts:22


logger

get logger(): any

Returns

any

Implementation of

IDataStore.logger

Inherited from

ServerComponent.logger

Defined in

server/ServerComponent.ts:15

Methods

convertColl

convertColl(coll, cls): void

Parameters

Name Type
coll any
cls any

Returns

void

Defined in

datastore/DataStore.ts:167


convertObj

convertObj(obj, cls): any

Parameters

Name Type
obj any
cls any

Returns

any

Defined in

datastore/DataStore.ts:163


deleteInstances

deleteInstances(query): Promise<any>

Parameters

Name Type
query any

Returns

Promise<any>

Implementation of

IDataStore.deleteInstances

Defined in

datastore/DataStore.ts:225


findInstance

findInstance(query, options): Promise<IInstanceData>

Parameters

Name Type
query any
options any

Returns

Promise<IInstanceData>

Implementation of

IDataStore.findInstance

Defined in

datastore/DataStore.ts:142


findInstances

findInstances(query, option?): Promise<IInstanceData[]>

Parameters

Name Type Default value
query any undefined
option any 'summary'

Returns

Promise<IInstanceData[]>

Implementation of

IDataStore.findInstances

Defined in

datastore/DataStore.ts:177


findItem

findItem(query): Promise<IItemData>

Parameters

Name Type
query any

Returns

Promise<IItemData>

Implementation of

IDataStore.findItem

Defined in

datastore/DataStore.ts:132


findItems

findItems(query): Promise<IItemData[]>

scenario: itemId { items { id : value } } itemKey { items {key: value } } instance, task { instance: { id: instanceId }, items: { elementId: value }} message { items: { messageId: nameofmessage, key: value } {} status { items: {status: 'wait' } } custom: { query: query, projection: projection }

New approach: just like MongoDB itemId { items { id : value } } itemKey { items {key: value } } instance, task { id: instanceId , items.elementId: value } message { items.messageId: nameofmessage, key: value } {} status { items.status: 'wait' } } custom: { query: query, projection: projection }

Problem with Mongodb: projection $elematch returns only the first record

Parameters

Name Type
query any

Returns

Promise<IItemData[]>

Implementation of

IDataStore.findItems

Defined in

datastore/DataStore.ts:211


install

install(): Promise<void>

first time installation of DB

creates a new collection and add an index

Returns

Promise<void>

Implementation of

IDataStore.install

Defined in

datastore/DataStore.ts:238


loadInstance

loadInstance(instanceId, options?): Promise<{ instance: IInstanceData = instanceData; items: any[] }>

Parameters

Name Type
instanceId any
options Object

Returns

Promise<{ instance: IInstanceData = instanceData; items: any[] }>

Implementation of

IDataStore.loadInstance

Defined in

datastore/DataStore.ts:49


save

save(instance, options?): Promise<void>

Parameters

Name Type
instance any
options Object

Returns

Promise<void>

Implementation of

IDataStore.save

Defined in

datastore/DataStore.ts:46

Clone this wiki locally