Пример #1
0
 public TRowSet Fetch(int count = int.MaxValue)
 {
     if (m_Operation != null & m_Operation.HasResultSet)
     {
         TRowSet rowSet        = null;
         bool    hasMoreRows   = true;
         int     totalRowsRead = 0;
         while (hasMoreRows)
         {
             var req = new TFetchResultsReq()
             {
                 MaxRows         = count - totalRowsRead,
                 Orientation     = TFetchOrientation.FETCH_NEXT,
                 OperationHandle = m_Operation,
             };
             var resultsResp = m_Client.FetchResults(req);
             resultsResp.Status.CheckStatus();
             rowSet        = Utils.CombineColumnValues(rowSet, resultsResp.Results);
             totalRowsRead = GetrValue(rowSet.Columns[0]).Count;
             hasMoreRows   = resultsResp.HasMoreRows && totalRowsRead < count;
         }
         return(rowSet);
     }
     return(null);
 }
Пример #2
0
        public TRowSet Fetch(int count = int.MaxValue)
        {
            if (m_Operation == null || !m_Operation.HasResultSet)
            {
                return(null);
            }
            var req = new TFetchResultsReq()
            {
                MaxRows         = count,
                Orientation     = TFetchOrientation.FETCH_NEXT,
                OperationHandle = m_Operation,
            };
            var resultsResp = m_Client.FetchResults(req);

            resultsResp.Status.CheckStatus();
            return(resultsResp.Results);
        }