API Reference
Interface
IDataReaderUtf8TextSource
Exposes the current field's text through provider-owned UTF-8 storage.
Remarks
This is an optional capability. A provider may return false for any field that requires decoding, conversion, or materialization. A supporting provider may initialize or update its text cache when a field is requested. The ordinary data-record getters remain available in either case.
Methods
public abstract Boolean TryGetUtf8Text(Int32 ordinal, out ReadOnlySpan<Byte> text) #Returns:
BooleanAttempts to borrow the current field's decoded text as UTF-8 bytes.
Parameters
- ordinal System.Int32
- The zero-based field ordinal.
- text System.ReadOnlySpan{System.Byte}@
- The borrowed text when successful; otherwise an empty span.
Returns
True when the field's text can be borrowed from provider-owned storage.
Exceptions
IndexOutOfRangeException– The ordinal is outside the reader's fields.InvalidOperationException– The reader is closed or is not positioned on a row.