WorkspaceDb Namespace
Interface
Type alias
Function
Defined in
WorkspaceDb Interface
A WorkspaceDb holds workspace resources. WorkspaceDb
s may just be local files, or they may be stored
in cloud WorkspaceContainers. Each WorkspaceResource
in a WorkspaceDb is identified by a WorkspaceResource.Name.
Resources of type string
and blob
may be loaded directly from the WorkspaceDb
. Resources of type file
are
copied from the WorkspaceDb into a temporary local file so they can be accessed by programs directly from disk.
Methods
Name |
Description |
|
close(): void |
|
|
getBlob(rscName: string): undefined | Uint8Array |
Get a blob resource from this WorkspaceDb, if present. |
|
getFile(rscName: string, targetFileName?: string): undefined | string |
Extract a local copy of a file resource from this WorkspaceDb, if present. |
|
getString(rscName: string): undefined | string |
Get a string resource from this WorkspaceDb, if present. |
|
open(): void |
|
|
prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch |
Ensure that the contents of a WorkspaceDb are downloaded into the local cache so that it may be accessed offline. |
|
Properties
Name |
Type |
Description |
|
container Readonly |
WorkspaceContainer |
The WorkspaceContainer holding this WorkspaceDb. |
|
dbFileName Readonly |
string |
Name by which a WorkspaceDb may be opened. |
|
dbName Readonly |
string |
The base name of this WorkspaceDb, without version |
|
onClose Readonly |
BeEvent<() => void> |
event raised before this WorkspaceDb is closed. |
|
sqliteDb Readonly |
SQLiteDb |
the SQLiteDb for this WorkspaceDb |
|
Defined in
Last Updated: 02 May, 2024