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

Dynamic conditions in views #61

Closed
aL3xa opened this issue Apr 16, 2012 · 2 comments
Closed

Dynamic conditions in views #61

aL3xa opened this issue Apr 16, 2012 · 2 comments

Comments

@aL3xa
Copy link

aL3xa commented Apr 16, 2012

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?

@langalex
Copy link
Owner

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".

@aL3xa
Copy link
Author

aL3xa commented Apr 16, 2012

Yeah, silly me. Sry for bugging you.

@aL3xa aL3xa closed this as completed Apr 16, 2012
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