/// <summary>
		/// Advances the reader to the next record in a result set.
		/// </summary>
		/// <returns>
		/// true if there are more rows; otherwise false.
		/// </returns>
		public override bool Read()
		{
			if (wrappedReader.Read())
			{
				var values = new object[wrappedReader.FieldCount];

				var result = wrappedReader.GetValues(values);

				SetValues(values);

				if (queryResults != null)
				{
					queryResults.Rows.Add(values);

					if (queryResults.Rows.Count > maxRows)
					{
						queryResults = null;
					}
				}

				return true;
			}

			return false;
		}
		/// <summary>
		/// Initializes a new instance of the CachingDataReaderCacheReader class.
		/// </summary>
		/// <param name="queryResults">The query results.</param>
		public CachingDataReaderCacheReader(DbQueryResults queryResults)
		{
			this.queryResults = queryResults;
		}
		/// <summary>
		/// Advances the reader to the next result when reading the results of a batch of statements.
		/// </summary>
		/// <returns>
		/// true if there are more result sets; otherwise false.
		/// </returns>
		public override bool NextResult()
		{
			if (wrappedReader.NextResult())
			{
				queryResults = null;
				return true;
			}

			return false;
		}