javascript - What is the maximum value for a compound CouchDB key? -
I am using a common trick to create an engaging scene:
// A customer has several orders; Show them in a scene together: Function (Doctor) {if (Doctor tape == "Customer") {emit ([doc._id, 0], doc); } And if (Doctor type == "order") {emit ([doc.customer_id, 1], doctor); }}
I know that I get a single customer
and all related commands
s:
? Startkey = ["some_customer_id"] and endki = ["some_customer_id", 2]
but now I have a query like very near my view code That's what I call my own " 2
" more clearly, "I want everything to be connected to this customer"? I think I have seen
? Startkey = ["some_customer_id"] and endki = ["some_customer_id", {}}
< More explanation from: / p> / P>
:
query
["foo", "bar"> startkey = ["foo"] and endki = ["foo", {}]
] and["foo", ["bar", "baz"]]
. Although["foo", {"a": "object"}]
then {}
is late , but definitely last
in your array key Instead of trying to find the biggest potential value for second element, I at least earlier Possible values: ? Startkey = ["some_customer_id"] and endki = ["some_customer_id \ u0000"] & amp; Inclusive_end = false
.
Comments
Post a Comment