Skip to content

Instantly share code, notes, and snippets.

@matzew
Last active December 11, 2015 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matzew/2d75e480500c69993227 to your computer and use it in GitHub Desktop.
Save matzew/2d75e480500c69993227 to your computer and use it in GitHub Desktop.

Hello,

a few quick/simple q's:

JavaScript

One question on the two gists...

Kris' gist uses pipe.next() of scrolling forward, Summer's comparison gist uses pipe.read(page:"next") for the JS.

I think I do like the 'plain' read overload in JS... - but having a more explicit next() (and others) is not that bad; but (currently) my vote would be pipe.read(page:"prev"......

Oh... What happens when I have a regular pipe, object (where the paged setting is NOT specified on its ctor), and I invoke pipe.read(page:"next") ? I hope it does not issue a JS/type error :-) but I'd expect to have a straight read of ALL the "objects" (or "entities")...

Android

You have the following:

cars.readWithFilter(filter, new Callback<Car>() {
  @Override
  void onSuccess(List<Car> data) {
    firstPage = data;
  }

  @Override
  void onError(Exception ex) {
    //handle error
  }
});


firstPage.next(.......);

I am wondering what is the fristPage here (since the data on the onSuccess has been assigned to it)

Change Offset and Limit

I like both (JS and Android) :) The Android solution is similar to what I had in mind for iOS...

I will update the comparison gist soon !

-Matthias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment