Closed
Description
This will be useful for cases when there is complex logic associated with a where clause. A good example is seen in #100 where there is complex logic associated with creating a search and the where clause could be generated many different ways. We should support a usage like this:
QueryExpressionDSL<SelectModel>.QueryExpressionWhereBuilder builder = select(person.allColumns())
.from(person)
.where();
if (someCondition) {
builder.and(id, isEqualto(3));
}
if (anotherCondition) {
builder.and(firstName, isNull());
}
SelectStatementProvider selectStatement = builder.build().render(RenderingStrategy.MYBATIS3);
This should render properly regardless of whether all conditions, or none, are satisfied.