【发布时间】:2020-01-14 19:56:19
【问题描述】:
我使用 couchDb 作为远程主数据库。我正在使用 pouchDb 将其复制到浏览器中。然后进行实时同步,以便我的远程主数据库中的任何更改都会在浏览器中同步。触发所有插入/更新更改事件并更新文档。但是当我在主文件中删除一个文档时,删除不同步,而不是事件“更改”事件在浏览器中被触发。
这里有什么我遗漏的吗?
this.db.replicate.from(this.remoteDb, {
view: this.remoteView,
});
this.db
.sync(this.remoteDb, {
live: true,
retry: true,
pull: true,
push: false,
view: this.remoteView,
})
.on("change", info => {
console.log("change from sync", info);
});
【问题讨论】:
标签: typescript couchdb pouchdb