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. For only Top, TopClause.WriteSql()
        //
        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");

                writer.Write(" ");
            }
        }
        // This function generates OFFSET, FETCH clause from Top and Skip information.
        // Note that this should be used only when Skip is present. For only Top, TopClause.WriteSql()
        //
        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");

                writer.Write(" ");
            }
        }