gyro icon indicating copy to clipboard operation
gyro copied to clipboard

Improve Finder Interface

Open beetlebugorg opened this issue 5 years ago • 0 comments

After using the finder implementation ($(external-query ..) and Finder class) for a bit we've determined there are a few tweaks that should be made to improve it.

  • Populate finder fields and use them instead of the filter map.
  • Throw an error if a field is provided that cannot be filtered on. The primary goal is to require the user to explicitly query using findAll when they want to find something that cannot be filtered using the filters provided by the various cloud APIs.
  • Update @for, @log, and @print directives to use streams
  • Update the interface to allow for streaming results.
public abstract class Finder<R extends Resource> {

    Scope scope;

    public abstract Stream<R> findAll();

    public abstract Stream<R> find();

}

beetlebugorg avatar Nov 25 '19 13:11 beetlebugorg