Class BufferingResult<T>
Abstract class for buffered results.
Implements
Namespace: MySqlX.XDevAPI.Common
Assembly: MySql.Data.dll
Version: 9.1.0
Syntax
public abstract class BufferingResult<T> : BaseResult, IEnumerable<T>, IEnumerable, IEnumerator<T>, IEnumerator, IDisposable
Type Parameters
Name | Description |
---|---|
T | Generic result type. |
Fields
_isComplete
Flag that indicates if all items have been read.
Declaration
protected bool _isComplete
Field Value
Type | Description |
---|---|
System.Boolean |
_items
List of generic items in this buffered result.
Declaration
protected List<T> _items
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<T> |
_position
Index of the current item.
Declaration
protected int _position
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Current
Gets the current item.
Declaration
public T Current { get; }
Property Value
Type | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | All items have already been read. |
NameMap
Gets a dictionary containing the column names and their index.
Declaration
protected Dictionary<string, int> NameMap { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Int32> |
PageSize
Gets the page size set for this buffered result.
Declaration
public int PageSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Buffer()
Retrieves a read-only list of the generic items associated to this buffered result.
Declaration
protected override void Buffer()
Overrides
Dispose()
No body has been defined for this method.
Declaration
public void Dispose()
FetchAll()
Retrieves a read-only list of the generic items associated to this buffered result.
Declaration
public ReadOnlyCollection<T> FetchAll()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<T> | A generic System.Collections.ObjectModel.ReadOnlyCollection<T> list representing items in this buffered result. |
FetchOne()
Retrieves one element from the generic items associated to this buffered result.
Declaration
public T FetchOne()
Returns
Type | Description |
---|---|
T | A generic object that corresponds to the current or default item. |
GetEnumerator()
Gets an System.Collections.Generic.IEnumerator<T> representation of this object.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | An System.Collections.Generic.IEnumerator<T> representation of this object. |
LoadColumnData()
Loads the column data into the MySqlX.XDevAPI.Common.BufferingResult`1._nameMap field.
Declaration
protected void LoadColumnData()
MoveNext()
Determines if all items have already been read.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System.Boolean | True if all items have been retrived, false otherwise. |
Next()
Determines if all items have already been read.
Declaration
public bool Next()
Returns
Type | Description |
---|---|
System.Boolean | True if all items have been retrived, false otherwise. |
ReadItem(Boolean)
Declaration
protected abstract T ReadItem(bool dumping)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | dumping |
Returns
Type | Description |
---|---|
T |
Reset()
Resets the value of the _position field to zero.
Declaration
public void Reset()
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Gets an System.Collections.IEnumerator representation of this object.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator representation of this object. |
IEnumerator.Current
Declaration
object IEnumerator.Current { get; }
Returns
Type | Description |
---|---|
System.Object |