Providers

Contains static storage providers and static factory methods for storage providers that require extra data to operate.

Be sure to install the necessary peer dependencies if using a storage provider that necessitates them

Source:

Properties

.JSONProvider: StorageProviderConstructor

Default storage provider for the framework. If no storage provider is passed in the client constructor, this provider will be used

Type:
StorageProviderConstructor
Source:

Methods

(static) .PostgresProvider(url: string)StorageProviderConstructor

Factory method that returns a StorageProvider class for a Postgres database via the given Postgres url. The given url should follow the format:

postgres://username:password@hostname:port/dbname

Note: Requires pg and sequelize peer dependencies

Parameters:
Name Type Description
url
string

Postgres database url

Source:
Returns:
StorageProviderConstructor

(static) .SQLiteProvider(path: string)StorageProviderConstructor

Factory method that returns a StorageProvider class for an SQLite database via the given SQLite filepath. The given path should be prefixed with sqlite://

Note: Requires sqlite3 and sequelize peer dependencies

Parameters:
Name Type Description
path
string

SQLite file path

Source:
Returns:
StorageProviderConstructor