prefetch Method

Ensure that the contents of a WorkspaceDb are downloaded into the local cache so that it may be accessed offline. Until the promise is resolved, the WorkspaceDb is not fully downloaded, but it may be safely accessed during the download. To determine the progress of the download, use the localBlocks and totalBlocks values returned by CloudContainer.queryDatabase.

prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch

@returns a CloudSqlite.CloudPrefetch object that can be used to await and/or cancel the prefetch.

@throws if this WorkspaceDb is not from a CloudContainer.

Parameter Type Description
opts CloudSqlite.PrefetchProps  

Returns - CloudSqlite.CloudPrefetch

a CloudSqlite.CloudPrefetch object that can be used to await and/or cancel the prefetch.

Defined in

Last Updated: 16 April, 2024