EditableWorkspaceContainer Interface
A WorkspaceContainer opened for editing by a WorkspaceEditor. You can create new WorkspaceDbs or new versions of existing WorkspaceDbs inside it. Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via acquireWriteLock. Only one user can hold the write lock at any given time. When you have finished making changes, you can use releaseWriteLock to publish your changes, or abandonChanges to discard them.
Extends
Methods
Name | Description | |
---|---|---|
abandonChanges(): void | Abandon any changes made to the container and release the write lock. | |
acquireWriteLock(user: string): void | Acquire the write lock on the container. | |
createDb(args: { dbName?: string, manifest: WorkspaceDbManifest, version?: string }): Promise<EditableWorkspaceDb> | Create a new, empty WorkspaceDb. | |
createNewWorkspaceDbVersion(props: CreateNewWorkspaceDbVersionArgs): Promise<{ newDb: WorkspaceDbNameAndVersion, oldDb: WorkspaceDbNameAndVersion }> | Create a copy of an existing WorkspaceDb in this container with a new WorkspaceDbVersion. | |
getEditableDb(props: WorkspaceDbProps): EditableWorkspaceDb | Get an editable WorkspaceDb to add, delete, or update resources within a newly created version of a WorkspaceDb. | |
releaseWriteLock(): void | Release the write lock on the container. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
getWorkspaceDb(props?: WorkspaceDbProps): WorkspaceDb Inherited | WorkspaceContainer | Obtain a WorkspaceDb satisfying the name and version criteria specified by props . |
resolveDbFileName(props: WorkspaceDbProps): string Inherited | WorkspaceContainer | Find the fully-qualified name of a WorkspaceDb satisfying the name and version criteria specified by props . |
Properties
Name | Type | Description | |
---|---|---|---|
cloudProps Readonly | undefined | WorkspaceContainerProps | Get the cloud properties of this container. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
cloudContainer Readonly Inherited | CloudSqlite.CloudContainer | undefined | WorkspaceContainer | Cloud container for this WorkspaceContainer, or undefined if this is a local WorkspaceContainer. |
fromProps Readonly Inherited | WorkspaceContainerProps | WorkspaceContainer | Properties supplied when this container was loaded |
workspace Readonly Inherited | Workspace | WorkspaceContainer | The workspace into which this container was loaded. |
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.