code: protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) {
          QueryModifiers mod = metadata.getModifiers();
          if (mod.getLimit() != null) {
              context.handle(limitTemplate, mod.getLimit());
          } else if (limitRequired) {
              context.handle(limitTemplate, maxLimit);
          }
          if (mod.getOffset() != null) {
              context.handle(offsetTemplate, mod.getOffset());
          }
      }
docs: template method for LIMIT and OFFSET serialization
  
  @param metadata
  @param context