Code Monkey home page Code Monkey logo

Comments (3)

KimStebel avatar KimStebel commented on August 10, 2024

inclusive_end and reduce default to true according to
http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options, so that's
what sprouch implements. As you already pointed out, you can always create
the set yourself.

On Wed, Jan 2, 2013 at 6:51 PM, Sam Smoot [email protected] wrote:

This code:

val flags = ViewQueryFlag(descending = true, include_docs = true)

Will return:

Set[sprouch.ViewQueryFlag] = Set(inclusive_end, include_docs, descending,
reduce)

None of those are CouchDB defaults, so the deviation in query-API defaults
by Sprouch is frustrating.

To return to default/expected behavior you need to pass something like
this to your Database.queryView() call instead:

import sprouch.ViewQueryFlag._val flags = Set[ViewQueryFlag](descending, include_docs)

That will avoid unnecessarily pulling in options you didn't specify. It
would be convenient if ViewQueryFlag.apply() only passed the intended
options though since the first example is what's demonstrated in the
tutorials.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6.

from sprouch.

sam avatar sam commented on August 10, 2024

Gotchas. Thanks. Creating it yourself doesn't actually work since there's the diff with ViewQueryFlag.all in queryView. But good to understand the rationale. Thanks.

from sprouch.

KimStebel avatar KimStebel commented on August 10, 2024

I changed exactly this diff now so that group=false isn't used any more in
queries with reduce=false. Does that fix your issue? My test works fine.

On Wed, Jan 2, 2013 at 7:05 PM, Sam Smoot [email protected] wrote:

Gotchas. Thanks. Creating it yourself doesn't actually work since there's
the diff with ViewQueryFlag.all in queryView. But good to understand the
rationale. Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-11817579.

from sprouch.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.