web library

Internal options used to customize how PowerSync opens databases on the web.

Classes

ClientConnection
A connection from a client from the perspective of a worker.
ConnectToRecommendedResult
The result of WebSqlite.connectToRecommended, containing the opened database as well as the FeatureDetectionResult leading to that database implementation being chosen.
Database
Abstraction over a database either available locally or in a remote worker.
DatabaseController
A controller responsible for opening databases in the worker.
FeatureDetectionResult
The result of WebSqlite.runFeatureDetection, describing which browsers and databases are available in the current browser.
FileSystem
A virtual file system used by a worker to persist database files.
WebSqlite
Provides asynchronous access to databases hosted in web workers.
WebSqliteConnection
A SqliteConnection interface implemented by opened connections when running on the web.
WebSqliteOpenFactory
An additional interface for SqliteOpenFactory exposing additional functionality that is only relevant when compiling to the web.
WorkerDatabase
A CommonDatabase wrapped with functionality to handle custom requests.

Enums

AccessMode
In addition to the StorageMode describing which browser API is used to store content, this enum describes how databases are accessed.
FileType
Types of files persisted for databases by virtual file system implementations.
MissingBrowserFeature
An enumeration of features not supported by the current browsers.
StorageMode
Available locations to store database content in browsers.

Typedefs

ExistingDatabase = (StorageMode, String)
A StorageMode, name pair representing an existing database already stored by the current browsing context.
PowerSyncWebOpenFactory = PowerSyncOpenFactory
The default core.PowerSyncOpenFactory implementation for the web. Unlike the cross-platform interface, this is guaranteed to implement WebSqliteOpenFactory.
SqliteWebEndpoint = (MessagePort, String)
An endpoint that can be used, by any running JavaScript context in the same website, to connect to an existing Database.
WebDatabaseEndpoint = ({String connectName, MessagePort connectPort, String? lockName})
An endpoint that can be used, by any running JavaScript context in the same website, to connect to an existing WebSqliteConnection.

Exceptions / Errors

RemoteException
An exception thrown when a operation fails on the remote worker.