Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::ODBC::SqlHandle< handleType > Class Template Reference

This template implements functionality common to the ODBC handle wrapper classes. More...

#include <HODBC.h>

Inheritance diagram for Harlinn::ODBC::SqlHandle< handleType >:
[legend]

Public Member Functions

constexpr SqlHandle () noexcept
 
 SqlHandle (const SqlHandle &other)=delete
 
constexpr SqlHandle (SqlHandle &&other) noexcept
 
 ~SqlHandle ()
 
SqlHandleoperator= (const SqlHandle &other)=delete
 
constexpr SqlHandleoperator= (SqlHandle &&other) noexcept
 
constexpr SQLHANDLE Handle () const noexcept
 
void Close () noexcept
 
Result Cancel () const
 
Result CompleteAsync (RETCODE *asyncRetCode) const
 

Static Public Attributes

static constexpr ODBC::HandleType HandleType = handleType
 
static constexpr SQLHANDLE InvalidHandle = ( SQLHANDLE )SQL_INVALID_HANDLE
 

Protected Member Functions

constexpr SqlHandle (SQLHANDLE sqlHandle, bool destructorClosesHandle) noexcept
 
void SetHandle (SQLHANDLE sqlHandle, bool destructorClosesHandle)
 
void ThrowException (SQLRETURN sqlReturn) const
 
void ThrowException (SQLRETURN sqlReturn, const wchar_t *function, const wchar_t *file, int line) const
 

Static Protected Member Functions

static SQLHANDLE AllocateHandle (SQLHANDLE inputHandle=SQL_NULL_HANDLE, ODBC::HandleType handleType=HandleType)
 

Private Attributes

SQLHANDLE sqlHandle_ = InvalidHandle
 
bool destructorClosesHandle_ = true
 

Detailed Description

template<ODBC::HandleType handleType>
class Harlinn::ODBC::SqlHandle< handleType >

This template implements functionality common to the ODBC handle wrapper classes.

Constructor & Destructor Documentation

◆ SqlHandle() [1/4]

template<ODBC::HandleType handleType>
Harlinn::ODBC::SqlHandle< handleType >::SqlHandle ( )
inlineconstexprnoexcept

◆ SqlHandle() [2/4]

template<ODBC::HandleType handleType>
Harlinn::ODBC::SqlHandle< handleType >::SqlHandle ( SQLHANDLE sqlHandle,
bool destructorClosesHandle )
inlineconstexprprotectednoexcept

◆ SqlHandle() [3/4]

template<ODBC::HandleType handleType>
Harlinn::ODBC::SqlHandle< handleType >::SqlHandle ( const SqlHandle< handleType > & other)
delete

◆ SqlHandle() [4/4]

template<ODBC::HandleType handleType>
Harlinn::ODBC::SqlHandle< handleType >::SqlHandle ( SqlHandle< handleType > && other)
inlineconstexprnoexcept

◆ ~SqlHandle()

template<ODBC::HandleType handleType>
Harlinn::ODBC::SqlHandle< handleType >::~SqlHandle ( )
inline

Member Function Documentation

◆ AllocateHandle()

template<ODBC::HandleType handleType>
static SQLHANDLE Harlinn::ODBC::SqlHandle< handleType >::AllocateHandle ( SQLHANDLE inputHandle = SQL_NULL_HANDLE,
ODBC::HandleType handleType = HandleType )
inlinestaticprotected

◆ Cancel()

template<ODBC::HandleType handleType>
Result Harlinn::ODBC::SqlHandle< handleType >::Cancel ( ) const
inline

◆ Close()

template<ODBC::HandleType handleType>
void Harlinn::ODBC::SqlHandle< handleType >::Close ( )
inlinenoexcept

◆ CompleteAsync()

template<ODBC::HandleType handleType>
Result Harlinn::ODBC::SqlHandle< handleType >::CompleteAsync ( RETCODE * asyncRetCode) const
inline

◆ Handle()

template<ODBC::HandleType handleType>
SQLHANDLE Harlinn::ODBC::SqlHandle< handleType >::Handle ( ) const
inlineconstexprnoexcept

◆ operator=() [1/2]

template<ODBC::HandleType handleType>
SqlHandle & Harlinn::ODBC::SqlHandle< handleType >::operator= ( const SqlHandle< handleType > & other)
delete

◆ operator=() [2/2]

template<ODBC::HandleType handleType>
SqlHandle & Harlinn::ODBC::SqlHandle< handleType >::operator= ( SqlHandle< handleType > && other)
inlineconstexprnoexcept

◆ SetHandle()

template<ODBC::HandleType handleType>
void Harlinn::ODBC::SqlHandle< handleType >::SetHandle ( SQLHANDLE sqlHandle,
bool destructorClosesHandle )
inlineprotected

◆ ThrowException() [1/2]

template<ODBC::HandleType handleType>
void Harlinn::ODBC::SqlHandle< handleType >::ThrowException ( SQLRETURN sqlReturn) const
inlineprotected

◆ ThrowException() [2/2]

template<ODBC::HandleType handleType>
void Harlinn::ODBC::SqlHandle< handleType >::ThrowException ( SQLRETURN sqlReturn,
const wchar_t * function,
const wchar_t * file,
int line ) const
inlineprotected

Member Data Documentation

◆ destructorClosesHandle_

template<ODBC::HandleType handleType>
bool Harlinn::ODBC::SqlHandle< handleType >::destructorClosesHandle_ = true
private

◆ HandleType

template<ODBC::HandleType handleType>
ODBC::HandleType Harlinn::ODBC::SqlHandle< handleType >::HandleType = handleType
staticconstexpr

◆ InvalidHandle

template<ODBC::HandleType handleType>
SQLHANDLE Harlinn::ODBC::SqlHandle< handleType >::InvalidHandle = ( SQLHANDLE )SQL_INVALID_HANDLE
staticconstexpr

◆ sqlHandle_

template<ODBC::HandleType handleType>
SQLHANDLE Harlinn::ODBC::SqlHandle< handleType >::sqlHandle_ = InvalidHandle
private

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