Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature View #9

Open
ajiagahari opened this issue Oct 2, 2019 · 2 comments
Open

new feature View #9

ajiagahari opened this issue Oct 2, 2019 · 2 comments

Comments

@ajiagahari
Copy link
Contributor

as mention here : https://docs.couchdb.org/en/stable/ddocs/views/pagination.html#example-data

couchdb has a view feature, so I wanna add new override method view in constructure, if it used then it will get view data only, because not every store use view

@ans-4175
Copy link
Member

ans-4175 commented Oct 2, 2019

Hey @ajiagahari could you please elaborate your method or approach?
This view , would affect in memory data or what structure?

@ajiagahari
Copy link
Contributor Author

this is the method I use in couchdb, using the design db feature in fauxton,

{
 "id": "_design/leads",
 "key": "_design/leads",
 "value": {
  "rev": "3-5939044487ce9417e15fc976e0451911"
 },
 "doc": {
  "_id": "_design/leads",
  "_rev": "3-5939044487ce9417e15fc976e0451911",
  "views": {
   "view-leads": {
    "map": "function (doc) {\n  if(doc.deletedAt === null || doc.deletedAt === ''){\n    emit(doc._id, doc);\n  }\n}"
   }
  },
  "language": "javascript"
 }
}

it created 1 row in all document so pouchy store always gets it, and it make sorting or others javascript object manipulation get messy, thats why I wanna propose override methode to handle this view, if not used it will use default config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants