Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:38:09+00:00 2026-06-07T17:38:09+00:00

I am quite new to CouchDB and have a very basic question: Is there

  • 0

I am quite new to CouchDB and have a very basic question:

Is there any possibility to pass a variable from the client into the map function, e.g.:

function (doc, params) {
    if (doc.property > params.property) emit(doc, null);
}

Thanks for your help,
Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:38:10+00:00Added an answer on June 7, 2026 at 5:38 pm

    While Dominic’s answer is true, the example in the actual question can probably be implemented as a map function with an appropriate key and a query that includes a startkey. So if you want the functionality that you show in your example you should change your view to this:

    function(doc) {
      if( doc.property )
        emit( doc.property, null);
    }
    

    And then your query would become:

    /db_name/_design/view_doc/_view/view_name?startkey="property_param"&include_docs=true
    

    Which would give you what your example suggests you’re after.

    This is the key (puns are funny) to working with CouchDB: create views that allow you to select subsets of the view based on the key using either key, keys or some combination of startkey and/or endkey

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

quite new to GWT i was wondering if there's any solution to automatically generate
Quite new to xslt so forgive me if this is a basic question -
quite new to JQuery and Ive run into a problem. I have a form
I´m quite new to R and I´m coming from a c++ background. I have
Still quite new to Python. I have a problem similar to this question .
I am quite new to mongoid and rails. So I have some troubles to
Am quite new to namespacing etc so hopefully this will be straightforward. I have
I am quite new to windows form app development. I have an app installed
Quite new to this mocking thing, I have a couple of questions. Correct me
Im quite new at Javascript however I have been trying to create a currency

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.