How to use the fulcrum-core.DataSource function in fulcrum-core

To help you get started, we’ve selected a few fulcrum-core 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 fulcrumapp / fulcrum-desktop / app / main / commands / command.js View on Github external
return _asyncToGenerator(function* () {
      let dataSource = new _fulcrumCore.DataSource();

      const localDatabase = new _localDatabaseDataSource2.default(account);

      dataSource.add(localDatabase);

      yield localDatabase.load(_this4.db);

      return dataSource;
    })();
  }
github fulcrumapp / fulcrum-desktop / src / sync.js View on Github external
async function synchronize(organizationName, formName) {
  db = await database(config);

  const where = {};

  if (organizationName) {
    where.organization_name = organizationName;
  }

  const accounts = await Account.findAll(db, where);

  for (const account of accounts) {
    let dataSource = new DataSource();

    const sqliteSource = new SQLiteDataSource(account);

    dataSource.add(sqliteSource);

    await sqliteSource.load(db);

    await Synchronizer.instance.run(account, formName, dataSource);
  }
}
github fulcrumapp / fulcrum-desktop / src / main / plugin.js View on Github external
async createDataSource(account) {
    let dataSource = new DataSource();

    const localDatabase = new LocalDatabaseDataSource(account);

    dataSource.add(localDatabase);

    await localDatabase.load(this.db);

    return dataSource;
  }
}
github fulcrumapp / fulcrum-desktop / dist / commands / command.js View on Github external
return _asyncToGenerator(function* () {
      let dataSource = new _fulcrumCore.DataSource();

      const localDatabase = new _localDatabaseDataSource2.default(account);

      dataSource.add(localDatabase);

      yield localDatabase.load(_this4.db);

      return dataSource;
    })();
  }
github fulcrumapp / fulcrum-desktop / src / main / app.js View on Github external
async createDataSource(account) {
    let dataSource = new DataSource();

    const localDatabase = new LocalDatabaseDataSource(account);

    dataSource.add(localDatabase);

    await localDatabase.load(this.db);

    return dataSource;
  }
}
github fulcrumapp / fulcrum-desktop / src / main / commands / cli.js View on Github external
async createDataSource(account) {
    let dataSource = new DataSource();

    const localDatabase = new LocalDatabaseDataSource(account);

    dataSource.add(localDatabase);

    await localDatabase.load(this.db);

    return dataSource;
  }
github fulcrumapp / fulcrum-desktop / dist / plugin.js View on Github external
return _asyncToGenerator(function* () {
      let dataSource = new _fulcrumCore.DataSource();

      const localDatabase = new _localDatabaseDataSource2.default(account);

      dataSource.add(localDatabase);

      yield localDatabase.load(_this2.db);

      return dataSource;
    })();
  }
github fulcrumapp / fulcrum-desktop / app / main / app.js View on Github external
return _asyncToGenerator(function* () {
      let dataSource = new _fulcrumCore.DataSource();

      const localDatabase = new _localDatabaseDataSource2.default(account);

      dataSource.add(localDatabase);

      yield localDatabase.load(_this7.db);

      return dataSource;
    })();
  }
github fulcrumapp / fulcrum-desktop / app / main / commands / cli.js View on Github external
return _asyncToGenerator(function* () {
      let dataSource = new _fulcrumCore.DataSource();

      const localDatabase = new _localDatabaseDataSource2.default(account);

      dataSource.add(localDatabase);

      yield localDatabase.load(_this5.db);

      return dataSource;
    })();
  }