Nevermind. Already answered my own question. Ordering is not related to order of the data in links ... just a coincidence of my setup and a smallish data set.
On 10 July 2011 15:27, Toby Hede <[email protected]> wrote: > Hello, > > Long-time linker, first-time poster, etc > > Just trying to confirm that links are stored as an array and therefore > the order of the links is preserved. > > I am using riak.js and coffeescript > > In this case a "column" has several "cards" > > column = {title: "development"} > meta = { links: [{bucket: "cards", key: "1", tag: "card"}, > {bucket: "cards", key: "2", tag: "card"}] } > riak.save(COLUMN, null, column, meta, (err, data, meta) ->) > > > Links are stored (according to rekon) as: > > [{"tag":"card","target":"/riak/cards/1"},{"tag":"card","target":"/riak/cards/2"},{"tag":"rel=up","target":"/riak/columns"}] > > When I walk the links: > riak.walk(COLUMN, key, [["_", "card"]], (err, data, meta) -> > > It certainly seems to preserve the ordering from the array, but is > this something I can rely on? > > Cheers, > Toby > > > Regards, > Toby Hede > -------------------------------------------------------- > email: [email protected] > twitter: @tobyhede > skype: tobyhede > linkedin: http://www.linkedin.com/in/tobyhede > plus: https://plus.google.com/u/0/100415561779631856102 > -------------------------------------------------------- > -------------------------------------------------------- > _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
