示例#1
0
 internal SqlFetch(SqlFetchOption option, SqlExpression rowCount, SqlCursor cursor,
                   params ISqlCursorFetchTarget[] targets)
     : base(SqlNodeType.Fetch)
 {
     this.option = option;
     if (targets != null)
     {
         for (int i = 0, l = targets.Length; i < l; i++)
         {
             this.targets.Add(targets[i]);
         }
     }
     this.cursor   = cursor;
     this.rowCount = rowCount;
 }
示例#2
0
 public SqlFetch Fetch(SqlFetchOption option, SqlExpression rowCount, params ISqlCursorFetchTarget[] target)
 {
     if (!rowCount.IsNullReference())
     {
         if (option != SqlFetchOption.Absolute && option != SqlFetchOption.Relative)
         {
             throw new ArgumentException(Strings.ExInvalidUsageOfTheRowCountArgument, "rowCount");
         }
         SqlValidator.EnsureIsArithmeticExpression(rowCount);
     }
     else if (option == SqlFetchOption.Absolute || option == SqlFetchOption.Relative)
     {
         throw new ArgumentException(Strings.ExInvalidUsageOfTheOrientationArgument, "option");
     }
     if (target != null)
     {
         for (int i = 0, l = target.Length; i < l; i++)
         {
             ArgumentValidator.EnsureArgumentNotNull(target[i], "target");
         }
     }
     return(new SqlFetch(option, rowCount, this, target));
 }
示例#3
0
 public SqlFetch Fetch(SqlFetchOption option, SqlExpression rowCount)
 {
     return(Fetch(option, rowCount, (ISqlCursorFetchTarget[])null));
 }
示例#4
0
 public SqlFetch Fetch(SqlFetchOption option)
 {
     return(Fetch(option, null, (ISqlCursorFetchTarget[])null));
 }
示例#5
0
 public SqlFetch Fetch(SqlFetchOption option, params ISqlCursorFetchTarget[] target)
 {
     return(Fetch(option, null, target));
 }