【问题标题】:How to build a "blog like" structure with pouchdb如何使用 pouchdb 构建“类似博客”的结构
【发布时间】:2016-10-20 01:14:07
【问题描述】:

我不确定对于像 pouchdb 中的数据库结构这样的博客来说,最好的方法是什么。我正在使用 ionic。

在常规的 sql 数据库中,我将有一个 categories 表 和一个 entries 表,每个表都具有唯一性id 字段和indexes 用于条目表上的“categorie”等内容。

由于 pouchdb 没有 tables,我应该使用 pouchdb 数据库作为等效表吗?

有没有更好的方法来解决这个问题?要标记的一件事是类别也可以删除。

【问题讨论】:

    标签: ionic-framework pouchdb


    【解决方案1】:

    您可以在数据库中的文档中定义一个唯一的字段,例如“blog_category”:“Horses”,并使用它来创建与之匹配的博客条目列表。 CouchDB 在这方面很有效。

    看看:https://github.com/nolanlawson/pouchdb-quick-search 和其他可用的插件:https://pouchdb.com/external.html,这可能会让您轻松。

    这是另一个关于结果分页信息的好链接:https://pouchdb.com/2014/04/14/pagination-strategies-with-pouchdb.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-01
      • 2015-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多