Skip to content

Class: IndexedDBDocumentService ​

Defined in: infrastructure/IndexedDBServices.ts:192

IndexedDB implementation of document service

Implements ​

Constructors ​

Constructor ​

ts
new IndexedDBDocumentService(): IndexedDBDocumentService;

Defined in: infrastructure/IndexedDBServices.ts:197

Opens (or creates) the sidedoc IndexedDB database.

Returns ​

IndexedDBDocumentService

Methods ​

createDocument() ​

ts
createDocument(params): Promise<DocumentInstance<string>>;

Defined in: infrastructure/IndexedDBServices.ts:202

Creates a document with a generated id and default QA, audit and version fields, and adds it to the document store.

Parameters ​

ParameterType
params{ data?: any; profileId: string; }
params.data?any
params.profileIdstring

Returns ​

Promise<DocumentInstance<string>>

Implementation of ​

DocumentService.createDocument


deleteDocument() ​

ts
deleteDocument(params): Promise<void>;

Defined in: infrastructure/IndexedDBServices.ts:278

Deletes a document from the document store.

Parameters ​

ParameterType
params{ documentId: string; }
params.documentIdstring

Returns ​

Promise<void>

Implementation of ​

DocumentService.deleteDocument


duplicateDocument() ​

ts
duplicateDocument(_params): Promise<DocumentInstance<string>>;

Defined in: infrastructure/IndexedDBServices.ts:296

Not implemented; throws.

Parameters ​

ParameterType
_params{ documentId: string; targetFolderId?: string; }
_params.documentIdstring
_params.targetFolderId?string

Returns ​

Promise<DocumentInstance<string>>

Implementation of ​

DocumentService.duplicateDocument


getDocument() ​

ts
getDocument(id): Promise<DocumentInstance<string>>;

Defined in: infrastructure/IndexedDBServices.ts:240

Reads a document from the document store. Rejects if it does not exist.

Parameters ​

ParameterType
idstring

Returns ​

Promise<DocumentInstance<string>>

Implementation of ​

DocumentService.getDocument


moveDocument() ​

ts
moveDocument(_params): Promise<void>;

Defined in: infrastructure/IndexedDBServices.ts:291

Not implemented; throws.

Parameters ​

ParameterType
_params{ documentId: string; targetFolderId: string; }
_params.documentIdstring
_params.targetFolderIdstring

Returns ​

Promise<void>

Implementation of ​

DocumentService.moveDocument


updateDocument() ​

ts
updateDocument(params): Promise<DocumentInstance<string>>;

Defined in: infrastructure/IndexedDBServices.ts:259

Replaces the data of a stored document and updates audit.updatedAt.

Parameters ​

ParameterType
params{ data: any; documentId: string; }
params.dataany
params.documentIdstring

Returns ​

Promise<DocumentInstance<string>>

Implementation of ​

DocumentService.updateDocument