EditableWorkspaceDb Interface
An editable WorkspaceDb. This is used only by tools to allow administrators to create and modify WorkspaceDbs. For cloud-based WorkspaceDbs, the container's write token must be obtained via acquireWriteLock before the methods in this interface may be used. Normally, only admins will have write access to a Workspace. Only one admin at a time may be editing a Workspace.
Extends
Methods
Name | Description | |
---|---|---|
addBlob(rscName: string, val: Uint8Array): void | Add a new binary 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. | |
removeBlob(rscName: string): void | Remove a binary 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. | |
updateManifest(manifest: WorkspaceDbManifest): void | Update the contents of the manifest in this WorkspaceDb. | |
updateSettingsResource(settings: SettingsContainer, rscName?: string): void | Add or update a resource in this WorkspaceDb that can be loaded as a SettingsDictionary. | |
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 Inherited | WorkspaceDb | Close the underlying sqliteDb. |
getBlob(rscName: string): undefined | Uint8Array Inherited | WorkspaceDb | Look up a binary resource by name, if one exists. |
getFile(rscName: string, targetFileName?: string): undefined | string Inherited | WorkspaceDb | Extract a local copy of a file resource from this WorkspaceDb, if present. |
getString(rscName: string): undefined | string Inherited | WorkspaceDb | Look up a string resource by name, if one exists. |
open(): void Inherited | WorkspaceDb | Open the underlying sqliteDb to perform a query. |
prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch Inherited | WorkspaceDb | Ensure that the contents of this WorkspaceDb are downloaded into the local cache so that it may be accessed offline. |
queryResources(args: WorkspaceDbQueryResourcesArgs): void Inherited | WorkspaceDb | Find resources of a particular type with names matching a specified pattern. |
Properties
Name | Type | Description | |
---|---|---|---|
container Readonly | EditableWorkspaceContainer | The WorkspaceContainer in which this db resides. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
dbFileName Readonly Inherited | string | WorkspaceDb | The name by which the WorkspaceDb can be opened. |
dbName Readonly Inherited | string | WorkspaceDb | The base name of this WorkspaceDb, without version |
isOpen Readonly Inherited | boolean | WorkspaceDb | Whether the underlying sqliteDb is currently opened. |
manifest Readonly Inherited | WorkspaceDbManifest | WorkspaceDb | The manifest that describes the contents and context of this WorkspaceDb. |
onClose Readonly Inherited | BeEvent<() => void> | WorkspaceDb | An event raised before this WorkspaceDb is closed. |
sqliteDb Readonly Inherited | SQLiteDb | WorkspaceDb | The underlying SQLite database that stores this WorkspaceDb's resources. |
version Readonly Inherited | string | WorkspaceDb | The version of this WorkspaceDb |
Defined in
Last Updated: 29 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.