// This function generates OFFSET, FETCH clause from Top and Skip information. // Note that this should be used only when Skip is present. // private static void WriteOffsetFetch(SqlWriter writer, TopClause top, SkipClause skip, SqlGenerator sqlGenerator) { DebugCheck.NotNull(skip); skip.WriteSql(writer, sqlGenerator); if (top != null) { writer.Write("FETCH NEXT "); top.TopCount.WriteSql(writer, sqlGenerator); writer.Write(" ROWS ONLY "); } }
private static void WriteOffsetFetch( SqlWriter writer, TopClause top, SkipClause skip, SqlGenerator sqlGenerator) { skip.WriteSql(writer, sqlGenerator); if (top == null) { return; } writer.Write("FETCH NEXT "); top.TopCount.WriteSql(writer, sqlGenerator); writer.Write(" ROWS ONLY "); }