@react-native-replicache/replicache-generic-sqlite
Version:
> Plug-in React Native compatibility bindings for [Replicache](https://replicache.dev/).
14 lines • 607 B
JavaScript
import { ReplicacheGenericSQLiteReadImpl } from "./replicache-generic-sqlite-read-impl";
export class ReplicacheGenericSQLiteWriteImpl extends ReplicacheGenericSQLiteReadImpl {
async put(key, value) {
const jsonValueString = JSON.stringify(value);
await this._assertTx().execute("INSERT OR REPLACE INTO entry (key, value) VALUES (?, ?)", [key, jsonValueString]);
}
async del(key) {
await this._assertTx().execute("DELETE FROM entry WHERE key = ?", [key]);
}
async commit() {
// Do nothing and wait for release.
}
}
//# sourceMappingURL=replicache-generic-sqlite-write-impl.js.map