I can do the following:
SqlBuilder.select(columName)
.from(tableName)
.where(userId, isEqualTo(id))
.and(type, isEqualTo("type1"))
.unionAll()
.select(columnName)
.from(tableName)
.where(userId, isEqualTo(id))
.and(type, isEqualTo("type2"));
However, I need to do an orderBy and a limit on each queries individually. If I add a .orderBy().limit() then I cannot do a .unionAll
How do I achieve this then?