Class: IndexedDBDocumentService
Defined in: infrastructure/IndexedDBServices.ts:192
IndexedDB implementation of document service
Implements
Constructors
Constructor
new IndexedDBDocumentService(): IndexedDBDocumentService;Defined in: infrastructure/IndexedDBServices.ts:197
Opens (or creates) the sidedoc IndexedDB database.
Returns
IndexedDBDocumentService
Methods
createDocument()
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
| Parameter | Type |
|---|---|
params | { data?: any; profileId: string; } |
params.data? | any |
params.profileId | string |
Returns
Promise<DocumentInstance<string>>
Implementation of
DocumentService.createDocument
deleteDocument()
deleteDocument(params): Promise<void>;Defined in: infrastructure/IndexedDBServices.ts:278
Deletes a document from the document store.
Parameters
| Parameter | Type |
|---|---|
params | { documentId: string; } |
params.documentId | string |
Returns
Promise<void>
Implementation of
DocumentService.deleteDocument
duplicateDocument()
duplicateDocument(_params): Promise<DocumentInstance<string>>;Defined in: infrastructure/IndexedDBServices.ts:296
Not implemented; throws.
Parameters
| Parameter | Type |
|---|---|
_params | { documentId: string; targetFolderId?: string; } |
_params.documentId | string |
_params.targetFolderId? | string |
Returns
Promise<DocumentInstance<string>>
Implementation of
DocumentService.duplicateDocument
getDocument()
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
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<DocumentInstance<string>>
Implementation of
moveDocument()
moveDocument(_params): Promise<void>;Defined in: infrastructure/IndexedDBServices.ts:291
Not implemented; throws.
Parameters
| Parameter | Type |
|---|---|
_params | { documentId: string; targetFolderId: string; } |
_params.documentId | string |
_params.targetFolderId | string |
Returns
Promise<void>
Implementation of
updateDocument()
updateDocument(params): Promise<DocumentInstance<string>>;Defined in: infrastructure/IndexedDBServices.ts:259
Replaces the data of a stored document and updates audit.updatedAt.
Parameters
| Parameter | Type |
|---|---|
params | { data: any; documentId: string; } |
params.data | any |
params.documentId | string |
Returns
Promise<DocumentInstance<string>>