EFIngresProvider/SqlGen/TopClause.cs
/// <summary>
/// Write out the TOP part of sql select statement 
/// It basically writes TOP (X) [WITH TIES].
/// </summary>
/// <param name="writer"></param>
/// <param name="sqlGenerator"></param>
Write out the TOP part of sql select statement
It basically writes TOP (X) [WITH TIES].
Write out the TOP part of sql select statement It basically writes TOP ( X ) [ WITH TIES ] .
public void WriteSql(SqlWriter writer, SqlGenerator sqlGenerator)
        {
            if (SkipCount != null)
            {
                writer.WriteLine();
                writer.Write("offset ");
                writer.Write(SkipCount.GetInt(sqlGenerator) + 1);
                writer.Write(" ");
            }
            if (TopCount != null)
            {
                writer.WriteLine();
                writer.Write("fetch ");
                if (SkipCount != null)
                {
                    writer.Write("next ");
                }
                else
                {
                    writer.Write("first ");
                }
                writer.Write(TopCount.GetInt(sqlGenerator));
                writer.Write(" rows only ");
            }
        }
public void WriteSql ( SqlWriter writer , SqlGenerator sqlGenerator ) { if ( SkipCount != null ) { writer . WriteLine ( ) ; writer . Write ( " " ) ; writer . Write ( SkipCount . GetInt ( sqlGenerator ) + 1 ) ; writer . Write ( " " ) ; } if ( TopCount != null ) { writer . WriteLine ( ) ; writer . Write ( " " ) ; if ( SkipCount != null ) { writer . Write ( " " ) ; } else { writer . Write ( " " ) ; } writer . Write ( TopCount . GetInt ( sqlGenerator ) ) ; writer . Write ( " " ) ; } }
Write out the TOP part of sql select statement
It basically writes TOP (X) [WITH TIES].
Write out the TOP part of sql select statement It basically writes TOP ( X ) [ WITH TIES ] .
writer
SqlWriter
None
sqlGenerator
SqlGenerator
None