ViewStore.CloudAccess Class
Provides access to a cloud-based ViewDb
Extends
Methods
Name | Description | |
---|---|---|
constructor(props: ViewStore.ViewStoreCtorProps): ViewStore.CloudAccess | ||
createNewContainer(args: ViewStore.CreateNewContainerProps): Promise<CloudSqlite.ContainerProps> Static | Create and initialize a new BlobContainer to hold a ViewStore |
Inherited methods
Name | Inherited from | Description |
---|---|---|
close(): void Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Close the database for this DbAccess if it is opened, and disconnect this `DbAccess from its CloudContainer. |
closeDb(): void Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Close the database for this DbAccess, if it is open |
openForRead(): ViewStore.ViewDb Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Ensure that the database controlled by this DbAccess is open for read access and return the database object. |
startPrefetch(): CloudSqlite.CloudPrefetch Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Start a prefetch operation to download all the blocks for the VersionedSqliteDb |
synchronizeWithCloud(): void Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Synchronize the local cache of this database with any changes by made by others. |
withLockedDb<T>(args: { openMode?: OpenMode, operationName: string, user?: string }, operation: () => Promise<T>): Promise<T> Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Perform an operation on this database with the lock held and the database opened for write |
_initializeDb(args: { blockSize?: "4M" | "64K", dbName: string, dbType: , props: CloudSqlite.ContainerProps }): Promise<void> Protected Static Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Initialize a cloud container to hold VersionedSqliteDbs. |
createBlobContainer(args: Omit<BlobContainer.CreateNewContainerProps, "userToken">): Promise<CloudSqlite.ContainerProps> Protected Static Inherited | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Create a new BlobContainer from the BlobContainer service to hold one or more VersionedSqliteDbs. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_cacheName Protected Static Inherited | string | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | |
_cloudDb Protected Inherited | ViewStore.ViewDb | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | |
_container Protected Inherited | CloudSqlite.CloudContainer | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | |
container Accessor Inherited ReadOnly | CloudSqlite.CloudContainer | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | the container for this DbAccess. It is automatically connected to the CloudCache whenever it is accessed. |
dbName Readonly Inherited | string | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | The name of the database within the cloud container. |
lockParams Readonly Inherited | CloudSqlite.ObtainLockParams | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | Parameters for obtaining the write lock for this container. |
reader Accessor Inherited ReadOnly | PickMethods<ReadMethods> | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | A Proxy Object to call a synchronous readonly method on the database controlled by this DbAccess .Whenever a method is called through this Proxy, it will first ensure that the database is opened for at least read access. |
sasToken Accessor Inherited | string | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | The token that grants access to the cloud container for this DbAccess. If it does not grant write permissions, all write operations will fail. It should be refreshed (via a timer) before it expires. |
writeLocker Accessor Inherited ReadOnly | PickAsyncMethods<WriteMethods> | CloudSqlite.DbAccess<ViewStore.ViewDb, ViewStore.ReadMethods, ViewStoreRpc.Writer> | A Proxy Object to call a writeable async method on the cloud database controlled by this DbAccess .Whenever a method is called through this Proxy, it will: - attempt to acquire the write lock on the container - open the database for write - call the method - close the database - upload changes - release the write lock. |
Defined in
- core/backend/src/ViewStore.ts Line 1394
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.