Opened 9 years ago

Closed 7 years ago

#11546 closed defect (wontfix)

CouchDBRestStore expects a string query parameter

Reported by: pegli Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

I've been trying to get CouchDBRestStore running with DataGrid?, but ran into a problem where that store assumes that the DataGrid? query argument is a string, but somewhere in DataGrid? the query must be an object. It would be helpful if the CouchDBRestStore would test for whether the query is an object and somehow render that into a URI path, maybe by using a special object property like "_path". The only workaround I've found so far is to make the query an object but provide a toString method so the data store works out correctly:

    <div dojoType="dojox.data.CouchDBRestStore" jsId="store" target="/docs" idAttribute="id" ></div>
    <div id="grid" dojoType="dojox.grid.DataGrid" store="store" structure="layout" query="{ toString: function() { return '_design/foo/_view/test?' }}" queryOptions="{deep:true}" rowsPerPage="40"></div>

Change History (3)

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

Your store. I know nothing about CouchDB, so I don't know what it should need to be.

comment:2 Changed 9 years ago by pegli

I did discover this morning that passing a string literal as the query also works:

<div id="grid" dojoType="dojox.grid.EnhancedGrid" store="store" structure="layout" query="'_design/foo/_view/test?'"></div>

(note the extra single quotes around the design document path)

comment:3 Changed 7 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.

Note: See TracTickets for help on using tickets.