Ticket #2543 (closed enhancement: fixed)

Opened 21 months ago

Last modified 20 months ago

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

Reported by: skinner Owned by: skinner
Priority: normal Milestone: 0.9
Component: Data Version: 0.4.1
Severity: normal Keywords:
Cc:

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

Changed 20 months ago by peller

  • status changed from new to closed
  • resolution set to fixed

See #2704

Note: See TracTickets for help on using tickets.