Opened 12 years ago

Closed 12 years ago

#2543 closed enhancement (fixed)

[dojo.data] document sorting API, and provide reference implementation

Reported by: skinner Owned by: skinner
Priority: high Milestone: 0.9
Component: Data Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

At our IRC meeting on 2007-02-27 we picked a standard sorting API for the find() method in the dojo.data Read API. The sorting API is documented in the meeting notes, but we need to also update the doc-comments in the dojo.data.core.Read.js file. We should also implement the sorting API in dojo.data.SimpleBaseStore? (or in some other base class), both to serve as a reference implemenation and also to provide a generic implementation so that sub-class authors don't need to think about sorting at all.

Here are the meeting notes: http://dojo.jot.com/2007-02-27 Here's what the API looks like:

store.find({sort:[
    {attribute:'last-name', descending:true}, 
    {attribute:'first-name', descending:false}, ...]});

store.find({sort:[{attribute:'last-name'}]}); // descending defaults to false

Change History (1)

comment:1 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

See #2704

Note: See TracTickets for help on using tickets.