WorkspaceDb Namespace

Interface

Name Description
WorkspaceDb.Props Properties that specify how to load a WorkspaceDb within a WorkspaceContainer.

Type alias

Name Description
WorkspaceDb.DbFullName The name of a WorkspaceDb within a WorkspaceContainer, including the version identifier
WorkspaceDb.DbName The base name of a WorkspaceDb within a WorkspaceContainer (without any version identifier)
WorkspaceDb.Name The name of a WorkspaceDb in a "workspace/databases" setting.
WorkspaceDb.Version The semver-format version identifier for a WorkspaceDb.
WorkspaceDb.VersionIncrement Scope to increment for a version number.
WorkspaceDb.VersionRange The semver range format identifier for a range of acceptable versions.

Function

Name Description
WorkspaceDb.construct construct a new instance of a WorkspaceDb

Defined in

WorkspaceDb Interface

A WorkspaceDb holds workspace resources. WorkspaceDbs 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: 19 April, 2024