list.add(new SQLServer2012Templates());
list.add(new TeradataTemplates()); // qualify
for (SQLTemplates templates : list) {
QEmployee employee = QEmployee.employee;
QueryMixin query = new QueryMixin();
query.from(employee);
query.orderBy(employee.firstname.asc());
query.addProjection(employee.id);
System.out.println(templates.getClass().getSimpleName());
System.out.println();
// limit
query.restrict(QueryModifiers.limit(10l));
System.out.println("* limit");
System.out.println(serialize(query.getMetadata(), templates));
System.out.println();
if (!templates.getClass().equals(SQLServerTemplates.class)) {
// offset
query.restrict(QueryModifiers.offset(10l));
System.out.println("* offset");
System.out.println(serialize(query.getMetadata(), templates));
System.out.println();
// limit and offset
query.restrict(new QueryModifiers(10l, 10l));
System.out.println("* limit and offset");
System.out.println(serialize(query.getMetadata(), templates));
System.out.println();
}
}
}