All activity
A Java ORM framework for MongoDB. This tool will help to build the MongoDB query statements automatically from an entity object and a query object.
doyto-query-mongodb
doytowin/doyto-query-mongodb: A Java Framework for MongoDB
Forb Yuan
left a comment
Not always. Sometimes ideas are so new that it’s hard for me to explain to others.
Do you ever find yourself worrying about not being the first to come up with or try something new?
Udaya Sri
Join the discussion
Forb Yuan
started a discussion
Are you tired of writing boilerplate code when building dynamic SQL queries? Check my idea!
Suppose I need to build a dynamic WHERE clause:
StringJoiner sql = new StringJoiner(" AND ", "WHERE", "");
List<Object> args = new ArrayList<>();
if (ageGt != null) {
sql.add("age > ?");
args.add(ageGt);
}
if (ageGe != null) {
sql.add("age >= ?");
args.add(ageGe);
}
if (ageLt != null) {
sql.add("age < ?");
args.add(ageLt);
}
// ...
return...