EditableWorkspaceDb Namespace
Function
Name | Description |
---|---|
EditableWorkspaceDb.construct | construct a new instance of an EditableWorkspaceDb |
EditableWorkspaceDb.createEmpty | Create a new, empty, EditableWorkspaceDb file on the local filesystem for importing Workspace resources. |
Defined in
EditableWorkspaceDb Interface
An editable WorkspaceDb. This is used only by tools to allow administrators to create and modify WorkspaceDb
s.
For CloudSqlite Workspaces, the write token must be obtained before the methods in this interface may be used. Normally
only admins will have write access to Workspaces. Only one admin at at time may be editing a Workspace.
Extends
Methods
Name | Description | |
---|---|---|
addBlob(rscName: string, val: Uint8Array): void | Add a new blob resource to this WorkspaceDb. | |
addFile(rscName: string, localFileName: string, fileExt?: string): void | Copy the contents of an existing local file into this WorkspaceDb as a file resource. | |
addString(rscName: string, val: string): void | Add a new string resource to this WorkspaceDb. | |
createDb(version?: string): Promise<void> | ||
getBlobWriter(rscName: string): SQLiteDb.BlobIO | Get a BlobIO writer for a previously-added blob WorkspaceResource. | |
removeBlob(rscName: string): void | Remove a blob resource. | |
removeFile(rscName: string): void | Remove a file resource. | |
removeString(rscName: string): void | Remove a string resource. | |
updateBlob(rscName: string, val: Uint8Array): void | Update an existing blob resource with a new value, or add it if it does not exist. | |
updateFile(rscName: string, localFileName: string): void | Replace an existing file resource with the contents of another local file. | |
updateString(rscName: string, val: string): void | Update an existing string resource with a new value, or add it if it does not exist. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
close(): void | WorkspaceDb | |
getBlob(rscName: string): undefined | Uint8Array | WorkspaceDb | Get a blob resource from this WorkspaceDb, if present. |
getFile(rscName: string, targetFileName?: string): undefined | string | WorkspaceDb | Extract a local copy of a file resource from this WorkspaceDb, if present. |
getString(rscName: string): undefined | string | WorkspaceDb | Get a string resource from this WorkspaceDb, if present. |
open(): void | WorkspaceDb | |
prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch | WorkspaceDb | Ensure that the contents of a WorkspaceDb are downloaded into the local cache so that it may be accessed offline. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
container Readonly | WorkspaceContainer | WorkspaceDb | The WorkspaceContainer holding this WorkspaceDb. |
dbFileName Readonly | string | WorkspaceDb | Name by which a WorkspaceDb may be opened. |
dbName Readonly | string | WorkspaceDb | The base name of this WorkspaceDb, without version |
onClose Readonly | BeEvent<() => void> | WorkspaceDb | event raised before this WorkspaceDb is closed. |
sqliteDb Readonly | SQLiteDb | WorkspaceDb | the SQLiteDb for this WorkspaceDb |
Defined in
Last Updated: 16 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.