Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return _asyncToGenerator(function* () {
let dataSource = new _fulcrumCore.DataSource();
const localDatabase = new _localDatabaseDataSource2.default(account);
dataSource.add(localDatabase);
yield localDatabase.load(_this4.db);
return dataSource;
})();
}
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);
}
}
async createDataSource(account) {
let dataSource = new DataSource();
const localDatabase = new LocalDatabaseDataSource(account);
dataSource.add(localDatabase);
await localDatabase.load(this.db);
return dataSource;
}
}
return _asyncToGenerator(function* () {
let dataSource = new _fulcrumCore.DataSource();
const localDatabase = new _localDatabaseDataSource2.default(account);
dataSource.add(localDatabase);
yield localDatabase.load(_this4.db);
return dataSource;
})();
}
async createDataSource(account) {
let dataSource = new DataSource();
const localDatabase = new LocalDatabaseDataSource(account);
dataSource.add(localDatabase);
await localDatabase.load(this.db);
return dataSource;
}
}
async createDataSource(account) {
let dataSource = new DataSource();
const localDatabase = new LocalDatabaseDataSource(account);
dataSource.add(localDatabase);
await localDatabase.load(this.db);
return dataSource;
}
return _asyncToGenerator(function* () {
let dataSource = new _fulcrumCore.DataSource();
const localDatabase = new _localDatabaseDataSource2.default(account);
dataSource.add(localDatabase);
yield localDatabase.load(_this2.db);
return dataSource;
})();
}
return _asyncToGenerator(function* () {
let dataSource = new _fulcrumCore.DataSource();
const localDatabase = new _localDatabaseDataSource2.default(account);
dataSource.add(localDatabase);
yield localDatabase.load(_this7.db);
return dataSource;
})();
}
return _asyncToGenerator(function* () {
let dataSource = new _fulcrumCore.DataSource();
const localDatabase = new _localDatabaseDataSource2.default(account);
dataSource.add(localDatabase);
yield localDatabase.load(_this5.db);
return dataSource;
})();
}