Skip to content
This repository

Dynamic conditions in views #61

aL3xa opened this Issue · 2 comments

2 participants

Aleksandar Blagotić Alexander Lang
Aleksandar Blagotić
aL3xa commented

Sorry for n00bish question, but I'd like to pass dynamic values to views via view definition in model. Something like:

view :completed, :key => :name, :conditions => "doc.completed === #{var}"

Is it at all possible, or should I stick with filters I wrote in JS?

Alexander Lang

Well, if you mean dynamic as in at query time then no, that's impossible with CouchDB. The conditions must be set at "compile time".

Aleksandar Blagotić
aL3xa commented

Yeah, silly me. Sry for bugging you.

Aleksandar Blagotić aL3xa closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.