CouchGrid only allows "shallow keys"

Bug #521943 reported by Niels Kjøller Hansen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Triaged
Low
Chad Miller

Bug Description

When using CouchGrid, It is only possible to query parameters in the first level. A way of making deeper keys would be greatly appreciated.

I have tried to hack the code to do it, but I really need more insight and some guidance before being able to do it right.

Further explanation:
If I have an item database for a transnational greengrocer chain

{
  "name" : "cucumber",
  "barcode" : "1234567890123",
  "danish_details" : {
    'local_price' : 7.00,
    'local_name' : 'agurk',
  },
  "swedish_details" : {
    'local_price' : 9.00,
    'local_name' : 'gurka',
  },
  "norwegian_details" : {
    'local_price' : 22.00,
    'local_name' : 'agurk',
  }
}

I am the danish local manager, and want to make use a CouchGrid for my point-of-sale software, and it needs these keys:
The danish name of the item, the danish price and the international barcode. To this, I would intuitively make my keys like this:

keys=['danish_details.local_name','danish_details.local_price','barcode']

Revision history for this message
Manuel de la Peña (mandel) wrote :

You mind what to take a look at the new implementation of couchgrid in the quidgets project lp:quidgets, AFAIK this couchgrid implementation is not maintained and the new implementation found in quidgets is more robust.

Revision history for this message
dobey (dobey) wrote :

Chad, should perhaps the couchgrid in desktopcouch be removed if there's one in quidgets that's actively maintained and people should be using instead?

Changed in desktopcouch:
assignee: nobody → Chad Miller (cmiller)
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.