free tutorial:
Hey guys, I made a for generating data on RDB for unit tests.
As an alternative of , Foxglove would try to generate data of columns automatically.
If you got some tedious or error-prone feeling when authoring INSERT INTO .. for unit tests on RDB, please check out this library.
Example:
import javax.sql.DataSource;
import guru.mikelue.foxglove.jdbc.JdbcTableFacet;
import guru.mikelue.foxglove.jdbc.JdbcDataGenerator;
// Generates 4 rows with "cr_brand "fixed to "Toyota" and
// 4 different values on "cr_model"
var facet = JdbcTableFacet.builder(TABLE_CAR)
.numberOfRows(4)
.column("cr_brand")
.fixed("Toyota")
.column("cr_model")
.roundRobin("Corolla", "Camry", "RAV4", "Prius")
.build();
new JdbcDataGenerator(getDataSource())
.generate(facet);
Hello eyerone, I'm here to share my first serious blog post related to Java As you can see it's about using Spring JPA's Specification and Pageable to dynamically filter, sort and paginate results from repo. Previously available articles cover only basic application of Specification without providing generic approach to the matter. That's what I'm trying to accomplish by my blog post.
I'll be obliged for any feedback on article, code and idea itself. Thanks in advance