Storage_2 Interface

Packages > @anticrm/core > Storage_2

Signature:

export interface Storage 

Properties

List of properties of this interface
Property Type Description
find Doc>(_class: Ref<Class>, query: DocumentQuery, options?: FindOptions) => Promise
findOne Doc>(_class: Ref<Class>, query: DocumentQuery) => Promise
remove (ctx: TxContext, _class: Ref<Class<Doc>>, _id: Ref<Doc>) => Promise
store (ctx: TxContext, doc: Doc) => Promise
update (ctx: TxContext, _class: Ref<Class<Doc>>, _id: Ref<Doc>, operations: TxOperation[]) => Promise

Events

find

Signature:

find: <T extends Doc>(_class: Ref<Class<T>>, query: DocumentQuery<T>, options?: FindOptions<T>) => Promise<T[]>;

findOne

Signature:

findOne: <T extends Doc>(_class: Ref<Class<T>>, query: DocumentQuery<T>) => Promise<T | undefined>;

remove

Signature:

remove: (ctx: TxContext, _class: Ref<Class<Doc>>, _id: Ref<Doc>) => Promise<void>;

store

Signature:

store: (ctx: TxContext, doc: Doc) => Promise<void>;

update

Signature:

update: (ctx: TxContext, _class: Ref<Class<Doc>>, _id: Ref<Doc>, operations: TxOperation[]) => Promise<void>;