Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::OCI::ArrayDataReader Class Reference

Provides access to the column values within each row. More...

#include <HOCI.h>

Inheritance diagram for Harlinn::OCI::ArrayDataReader:
[legend]
Collaboration diagram for Harlinn::OCI::ArrayDataReader:
[legend]

Public Types

using Base = DataReaderBase<ArrayDataReader, OCI::ArrayDefine>
 
- Public Types inherited from Harlinn::OCI::DataReaderBase< ArrayDataReader, OCI::ArrayDefine >
using DefineType
 
using DerivedType
 

Public Member Functions

 ArrayDataReader (const OCI::Statement &statement, size_t rowCount)
 
template<typename DefineType , typename ... ArgTypes>
requires std::is_base_of_v<ArrayDefine, DefineType>
DefineTypeDefine (UInt32 position, ArgTypes... args)
 
template<typename DefineType , typename ... ArgTypes>
requires Internal::HasTraits<DefineType>
Internal::Traits< DefineType >::ArrayDefineType * Define (UInt32 position, ArgTypes... args)
 
bool IsDBNull (UInt32 index) const
 Return whether the specified field is set to null.
 
const void * GetData (UInt32 index) const noexcept
 
bool GetBoolean (UInt32 i) const
 Gets the value of the specified column as a bool.
 
Byte GetByte (UInt32 i) const
 Gets the value of the specified column as a Byte.
 
SByte GetSByte (UInt32 i) const
 Gets the value of the specified column as a SByte.
 
Int16 GetInt16 (UInt32 i) const
 Gets the value of the specified column as an Int16.
 
UInt16 GetUInt16 (UInt32 i) const
 Gets the value of the specified column as an UInt16.
 
Int32 GetInt32 (UInt32 i) const
 Gets the value of the specified column as an Int32.
 
UInt32 GetUInt32 (UInt32 i) const
 Gets the value of the specified column as an UInt32.
 
Int64 GetInt64 (UInt32 i) const
 Gets the value of the specified column as an Int64.
 
UInt64 GetUInt64 (UInt32 i) const
 Gets the value of the specified column as an UInt64.
 
float GetSingle (UInt32 i) const
 Gets the value of the specified column as a float.
 
double GetDouble (UInt32 i) const
 Gets the value of the specified column as a double.
 
DateTime GetDateTime (UInt32 i) const
 Gets the value of the specified column as a DateTime.
 
TimeSpan GetTimeSpan (UInt32 i) const
 Gets the value of the specified column as a TimeSpan.
 
Guid GetGuid (UInt32 i) const
 Gets the value of the specified column as a Guid.
 
WideString GetString (UInt32 i) const
 Gets the value of the specified column as a std::wsrting.
 
OCI::ObjectGetObject (UInt32 i) const
 
OCI::CollectionGetCollection (UInt32 i) const
 
LobStream GetStream (UInt32 i) const
 
- Public Member Functions inherited from Harlinn::OCI::DataReaderBase< ArrayDataReader, OCI::ArrayDefine >
size_t CurrentRowIndex () const noexcept
 
size_t RowsFetched () const noexcept
 
DefineTypeGetDefine (UInt32 index) const noexcept
 
bool Read ()
 
T As (UInt32 i) const
 
bool As (UInt32 index) const
 
std::optional< bool > As (UInt32 index) const
 
SByte As (UInt32 index) const
 
std::optional< SByteAs (UInt32 index) const
 
Byte As (UInt32 index) const
 
std::optional< ByteAs (UInt32 index) const
 
Int16 As (UInt32 index) const
 
std::optional< Int16As (UInt32 index) const
 
UInt16 As (UInt32 index) const
 
std::optional< UInt16As (UInt32 index) const
 
Int32 As (UInt32 index) const
 
std::optional< Int32As (UInt32 index) const
 
UInt32 As (UInt32 index) const
 
std::optional< UInt32As (UInt32 index) const
 
Int64 As (UInt32 index) const
 
std::optional< Int64As (UInt32 index) const
 
UInt64 As (UInt32 index) const
 
std::optional< UInt64As (UInt32 index) const
 
Single As (UInt32 index) const
 
std::optional< SingleAs (UInt32 index) const
 
Double As (UInt32 index) const
 
std::optional< DoubleAs (UInt32 index) const
 
DateTime As (UInt32 index) const
 
std::optional< DateTimeAs (UInt32 index) const
 
TimeSpan As (UInt32 index) const
 
std::optional< TimeSpanAs (UInt32 index) const
 
Guid As (UInt32 index) const
 
std::optional< GuidAs (UInt32 index) const
 
WideString As (UInt32 index) const
 
std::optional< WideStringAs (UInt32 index) const
 

Protected Member Functions

void Fetch ()
 
void Prefetch (Int32 executeResult)
 
virtual HO_EXPORT void InitializeDefines ()
 
- Protected Member Functions inherited from Harlinn::OCI::DataReaderBase< ArrayDataReader, OCI::ArrayDefine >
 DataReaderBase (const OCI::Statement &statement) noexcept
 
const OCI::StatementStatement () const noexcept
 
const OCI::ServiceContextServiceContext () const noexcept
 
const OCI::ErrorHandleError () const noexcept
 
const OCI::EnvironmentEnvironment () const
 

Private Attributes

size_t rowCount_
 

Friends

class Statement
 
template<typename DerivedT , typename DefineT >
class DataReaderBase
 

Additional Inherited Members

- Protected Attributes inherited from Harlinn::OCI::DataReaderBase< ArrayDataReader, OCI::ArrayDefine >
const OCI::Statementstatement_
 
std::vector< std::unique_ptr< DefineType > > defines_
 
size_t currentRowIndex_
 
size_t rowsFetched_
 
bool noMoreData_
 

Detailed Description

Provides access to the column values within each row.

Internally ArrayDataReader retrieves multiple rows from the database on each fetch significantly improving read performance.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ ArrayDataReader()

Harlinn::OCI::ArrayDataReader::ArrayDataReader ( const OCI::Statement & statement,
size_t rowCount )
inline

Member Function Documentation

◆ Define() [1/2]

template<typename DefineType , typename ... ArgTypes>
requires std::is_base_of_v<ArrayDefine, DefineType>
DefineType * Harlinn::OCI::ArrayDataReader::Define ( UInt32 position,
ArgTypes... args )
inline

◆ Define() [2/2]

template<typename DefineType , typename ... ArgTypes>
requires Internal::HasTraits<DefineType>
Internal::Traits< DefineType >::ArrayDefineType * Harlinn::OCI::ArrayDataReader::Define ( UInt32 position,
ArgTypes... args )
inline

◆ Fetch()

void Harlinn::OCI::ArrayDataReader::Fetch ( )
inlineprotected

◆ GetBoolean()

bool Harlinn::OCI::ArrayDataReader::GetBoolean ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a bool.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetByte()

Byte Harlinn::OCI::ArrayDataReader::GetByte ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a Byte.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetCollection()

OCI::Collection * Harlinn::OCI::ArrayDataReader::GetCollection ( UInt32 i) const
inlinenodiscard

◆ GetData()

const void * Harlinn::OCI::ArrayDataReader::GetData ( UInt32 index) const
inlinenoexcept

◆ GetDateTime()

DateTime Harlinn::OCI::ArrayDataReader::GetDateTime ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a DateTime.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetDouble()

double Harlinn::OCI::ArrayDataReader::GetDouble ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a double.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetGuid()

Guid Harlinn::OCI::ArrayDataReader::GetGuid ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a Guid.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetInt16()

Int16 Harlinn::OCI::ArrayDataReader::GetInt16 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an Int16.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetInt32()

Int32 Harlinn::OCI::ArrayDataReader::GetInt32 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an Int32.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetInt64()

Int64 Harlinn::OCI::ArrayDataReader::GetInt64 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an Int64.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetObject()

OCI::Object * Harlinn::OCI::ArrayDataReader::GetObject ( UInt32 i) const
inlinenodiscard

◆ GetSByte()

SByte Harlinn::OCI::ArrayDataReader::GetSByte ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a SByte.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetSingle()

float Harlinn::OCI::ArrayDataReader::GetSingle ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a float.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetStream()

LobStream Harlinn::OCI::ArrayDataReader::GetStream ( UInt32 i) const
inlinenodiscard

◆ GetString()

WideString Harlinn::OCI::ArrayDataReader::GetString ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a std::wsrting.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetTimeSpan()

TimeSpan Harlinn::OCI::ArrayDataReader::GetTimeSpan ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a TimeSpan.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetUInt16()

UInt16 Harlinn::OCI::ArrayDataReader::GetUInt16 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an UInt16.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetUInt32()

UInt32 Harlinn::OCI::ArrayDataReader::GetUInt32 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an UInt32.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ GetUInt64()

UInt64 Harlinn::OCI::ArrayDataReader::GetUInt64 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as an UInt64.

Parameters
indexThe index of the field to find.
Returns
The value of the column.

◆ InitializeDefines()

void Harlinn::OCI::ArrayDataReader::InitializeDefines ( )
protectedvirtual

◆ IsDBNull()

bool Harlinn::OCI::ArrayDataReader::IsDBNull ( UInt32 index) const
inlinenodiscard

Return whether the specified field is set to null.

Parameters
indexThe index of the field to find.
Returns
true if the specified field is set to null; otherwise, false.

◆ Prefetch()

void Harlinn::OCI::ArrayDataReader::Prefetch ( Int32 executeResult)
inlineprotected

Friends And Related Symbol Documentation

◆ DataReaderBase

template<typename DerivedT , typename DefineT >
friend class DataReaderBase
friend

◆ Statement

friend class Statement
friend

Member Data Documentation

◆ rowCount_

size_t Harlinn::OCI::ArrayDataReader::rowCount_
private

The documentation for this class was generated from the following files: