@electric-sql/drivers
Version:
ElectricSQL database drivers.
25 lines • 497 B
JavaScript
class MockDatabase {
constructor(host, port, database, fail) {
this.host = host;
this.port = port;
this.database = database;
this.name = `${host}:${port}/${database ?? ""}`;
this.fail = fail;
}
name;
fail;
async query(_queryConfig) {
if (typeof this.fail !== "undefined") throw this.fail;
return {
rows: [{ val: 1 }, { val: 2 }],
rowCount: 0
};
}
async stop() {
return;
}
}
export {
MockDatabase
};
//# sourceMappingURL=mock.js.map