Skip to content
Use Java Stream API for your JDBC queries.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
StreamedSQL
.gitignore
LICENSE
README.md

README.md

streamed-sql

Use Java Stream API for your JDBC queries.

It's very easy to use:

Connection conn = dbpool.getConnection();
var strsql = StreamedSQL.create(conn, true); 
try (Stream<Foo> stream = strsql.stream("SELECT * FROM FOO", Foo::new)) {
  stream.filter(f -> f.getName().startsWith("L")).sorted().forEachOrdered(System.out::println);
}

You get a stream and you can just map the data to any POJO and then process them as a stream.
In this example strsql is set to use a default connection and return parallel streams.

See Example.java for more details and read the javadoc.

This is based on an idea I found on Stackoverflow: https://stackoverflow.com/a/32232173/2123025

You can’t perform that action at this time.