Exemplo n.º 1
0
        // 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 ");
            }
        }
Exemplo n.º 2
0
 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 ");
 }
        // 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 ");
            }
        }