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

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

#include <HOCI.h>

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

Public Types

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

Public Member Functions

 DataReader (const OCI::Statement &statement) noexcept
 
template<typename DT , typename ... ArgTypes>
requires std::is_base_of_v<OCI::Define, DefineType>
DT * Define (UInt32 position, ArgTypes &&... args)
 
template<typename DefineType , typename ... ArgTypes>
requires Internal::HasTraits<DefineType>
Internal::Traits< DefineType >::DefineTypeDefine (UInt32 position, ArgTypes... args)
 
bool IsDBNull (UInt32 index) const
 Return whether the specified field is set to null.
 
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 a Int16.
 
UInt16 GetUInt16 (UInt32 i) const
 Gets the value of the specified column as a UInt16.
 
Int32 GetInt32 (UInt32 i) const
 Gets the value of the specified column as a Int32.
 
UInt32 GetUInt32 (UInt32 i) const
 Gets the value of the specified column as a UInt32.
 
Int64 GetInt64 (UInt32 i) const
 Gets the value of the specified column as a Int64.
 
UInt64 GetUInt64 (UInt32 i) const
 Gets the value of the specified column as a 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 WideString.
 
OCI::ObjectGetObject (UInt32 i) const
 
OCI::CollectionGetCollection (UInt32 i) const
 
LobStream GetStream (UInt32 i) const
 
- Public Member Functions inherited from Harlinn::OCI::DataReaderBase< DataReader, OCI::Define >
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

virtual HO_EXPORT void InitializeDefines ()
 
void Fetch ()
 
void Prefetch (Int32 executeResult)
 
- Protected Member Functions inherited from Harlinn::OCI::DataReaderBase< DataReader, OCI::Define >
 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
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from Harlinn::OCI::DataReaderBase< DataReader, OCI::Define >
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.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ DataReader()

Harlinn::OCI::DataReader::DataReader ( const OCI::Statement & statement)
inlinenoexcept

Member Function Documentation

◆ Define() [1/2]

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

◆ Define() [2/2]

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

◆ Fetch()

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

◆ GetBoolean()

bool Harlinn::OCI::DataReader::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::DataReader::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::DataReader::GetCollection ( UInt32 i) const
inlinenodiscard

◆ GetDateTime()

DateTime Harlinn::OCI::DataReader::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::DataReader::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::DataReader::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::DataReader::GetInt16 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a Int16.

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

◆ GetInt32()

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

Gets the value of the specified column as a Int32.

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

◆ GetInt64()

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

Gets the value of the specified column as a Int64.

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

◆ GetObject()

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

◆ GetSByte()

SByte Harlinn::OCI::DataReader::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::DataReader::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::DataReader::GetStream ( UInt32 i) const
inlinenodiscard

◆ GetString()

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

Gets the value of the specified column as a WideString.

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

◆ GetTimeSpan()

TimeSpan Harlinn::OCI::DataReader::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::DataReader::GetUInt16 ( UInt32 i) const
inlinenodiscard

Gets the value of the specified column as a UInt16.

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

◆ GetUInt32()

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

Gets the value of the specified column as a UInt32.

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

◆ GetUInt64()

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

Gets the value of the specified column as a UInt64.

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

◆ InitializeDefines()

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

◆ IsDBNull()

bool Harlinn::OCI::DataReader::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::DataReader::Prefetch ( Int32 executeResult)
inlineprotected

Friends And Related Symbol Documentation

◆ DataReaderBase

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

◆ Statement

friend class Statement
friend

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