You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that in simply_stored/lib/simply_stored/couch/finders.rb there is a :first method implemented, so I can fetch the first record of that type. Working.
But I am missing a :last method allowing me, to get the last record ...
Yrah, it would have to look different, but that's not hard to achieve with CouchDB, as you can tell it to walk the view's b-tree backwards. I'll look into it.
hey matt, I just found out one way of achieving this MyModel.last thing ... I am not sure whether there is a more generic method, but If you specify a view for the model like
I have found that in simply_stored/lib/simply_stored/couch/finders.rb there is a :first method implemented, so I can fetch the first record of that type. Working.
But I am missing a :last method allowing me, to get the last record ...
should be something like
as the first query is made via
it seems that a performant approach has to look different for last as for first as we cannot use that :limit => 1 here
The text was updated successfully, but these errors were encountered: