How to use @orbit/indexeddb - 2 common examples

To help you get started, we’ve selected a few @orbit/indexeddb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sillsdev / web-languageforge / src / SIL.XForge.Scripture / ClientApp / src / xforge-common / orbit-service.ts View on Github external
});

    this._store = new XForgeStore({
      schema: this._schema,
      bucket: this.bucket
    });

    this.remote = new XForgeJSONAPISource({
      schema: this._schema,
      bucket: this.bucket,
      name: REMOTE,
      host: this.locationService.origin,
      namespace: NAMESPACE
    });

    this.backup = new IndexedDBSource({
      schema: this._schema,
      bucket: this.bucket,
      name: BACKUP,
      namespace: 'xforge'
    });

    this.coordinator = new Coordinator({
      sources: [this._store, this.remote, this.backup],
      strategies: [
        // Handle a pull failure
        new RemotePullFailStrategy(REMOTE),
        // Handle a push failure
        new RemotePushFailStrategy(REMOTE, STORE),
        // Query the remote server whenever the store is queried
        new StoreRemoteQueryStrategy(STORE, REMOTE),
        // Update the remote server whenever the store is updated

@orbit/indexeddb

IndexedDB support for Orbit.

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Popular @orbit/indexeddb functions