gyro
gyro copied to clipboard
Improve Finder Interface
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();
}