Show HN: SQL-like queries on in-memory Java collections/arrays
github.com
github.com
It provides the same functionality but without string field references (a disaster for refactoring). Additionally it won't require learning a new DSL for basic comparisons because the logic is contained in normal Java code with lambdas and method references.
this:
Gather query = Gather.where("age").greaterThan(50).and("status").is("active");
List<Employee> filtered = query.find(employees);
becomes this: List<Employee> filtered = employess.filter(e -> e.age > 50 && e.status.equals("active"));Though reflection is slower, it allows us to fire queries on List<Object> sort of collections and the built in type conversions may allow us to compare a Calendar instance to a Date, or a Long to a String (with implicit parsing and conversions).