@Override
    protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) {
        if (!metadata.getOrderBy().isEmpty()) {
            QueryModifiers mod = metadata.getModifiers();
            if (mod.getLimit() == null) {
                context.handle(offsetTemplate, mod.getOffset());
            } else if (mod.getOffset() == null) {
                context.handle(limitOffsetTemplate, mod.getLimit(), 0);
            } else {
                context.handle(limitOffsetTemplate, mod.getLimit(), mod.getOffset());
            }
        }
    }
{@code SQLServer2012Templates} is an SQL dialect for Microsoft SQL Server 2012 and later

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/SQLServer2012Templates.java