NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
impl::CDB_Params Class Reference

Search Toolkit Book for impl::CDB_Params

#include <dbapi/driver/util/parameters.hpp>

Classes

struct  SParam
 

Public Types

enum  { kNoParamNumber = kMax_UInt }
 
enum  EStatus { fBound = 0x1 , fSet = 0x2 , fOutput = 0x4 }
 
typedef int TStatus
 

Public Member Functions

 CDB_Params (void)
 
 ~CDB_Params ()
 
bool BindParam (unsigned int param_no, const string &param_name, CDB_Object *param, bool is_out=false)
 
bool SetParam (unsigned int param_no, const string &param_name, CDB_Object *param, bool is_out=false)
 
unsigned int NofParams () const
 
CDB_ObjectGetParam (unsigned int param_no) const
 
const stringGetParamName (unsigned int param_no) const
 
unsigned int GetParamNum (const string &param_name) const
 This method will throw an exception if parameter's name doesn't exist. More...
 
unsigned int GetParamNum (unsigned int param_no, const string &param_name)
 This method will create a parameter if it doesn't exist. More...
 
TStatus GetParamStatus (unsigned int param_no) const
 
void LockBinding (void)
 
bool IsLocked (void) const
 
CDB_ParamsSemiShallowClone (void) const
 Yield a lightweight copy of these parameters, sharing representations for variable-length datatypes. More...
 

Private Member Functions

bool GetParamNumInternal (const string &param_name, unsigned int &param_num) const
 

Private Attributes

deque< SParamm_Params
 
bool m_Locked
 

Detailed Description

Definition at line 46 of file parameters.hpp.

Member Typedef Documentation

◆ TStatus

Definition at line 81 of file parameters.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNoParamNumber 

Definition at line 52 of file parameters.hpp.

◆ EStatus

Enumerator
fBound 
fSet 
fOutput 

Definition at line 76 of file parameters.hpp.

Constructor & Destructor Documentation

◆ CDB_Params()

impl::CDB_Params::CDB_Params ( void  )

Definition at line 92 of file parameters.cpp.

◆ ~CDB_Params()

impl::CDB_Params::~CDB_Params ( )

Definition at line 186 of file parameters.cpp.

Member Function Documentation

◆ BindParam()

bool impl::CDB_Params::BindParam ( unsigned int  param_no,
const string param_name,
CDB_Object param,
bool  is_out = false 
)

Definition at line 151 of file parameters.cpp.

References GetParamNum(), and m_Params.

Referenced by impl::CDBBindedParams::Bind(), CTL_BCPInCmd::Bind(), and CODBC_BCPInCmd::Bind().

◆ GetParam()

CDB_Object* impl::CDB_Params::GetParam ( unsigned int  param_no) const
inline

◆ GetParamName()

const string& impl::CDB_Params::GetParamName ( unsigned int  param_no) const
inline

◆ GetParamNum() [1/2]

unsigned int impl::CDB_Params::GetParamNum ( const string param_name) const

This method will throw an exception if parameter's name doesn't exist.

Definition at line 115 of file parameters.cpp.

References DATABASE_DRIVER_ERROR, and GetParamNumInternal().

Referenced by BindParam(), impl::CDBBindedParams::GetIndex(), and SetParam().

◆ GetParamNum() [2/2]

unsigned int impl::CDB_Params::GetParamNum ( unsigned int  param_no,
const string param_name 
)

This method will create a parameter if it doesn't exist.

Definition at line 128 of file parameters.cpp.

References CHECK_DRIVER_ERROR, GetParamNumInternal(), IsLocked(), kNoParamNumber, and m_Params.

◆ GetParamNumInternal()

bool impl::CDB_Params::GetParamNumInternal ( const string param_name,
unsigned int param_num 
) const
private

◆ GetParamStatus()

TStatus impl::CDB_Params::GetParamStatus ( unsigned int  param_no) const
inline

◆ IsLocked()

bool impl::CDB_Params::IsLocked ( void  ) const
inline

Definition at line 91 of file parameters.hpp.

References m_Locked.

Referenced by GetParamNum().

◆ LockBinding()

void impl::CDB_Params::LockBinding ( void  )
inline

◆ NofParams()

unsigned int impl::CDB_Params::NofParams ( ) const
inline

◆ SemiShallowClone()

CDB_Params * impl::CDB_Params::SemiShallowClone ( void  ) const

Yield a lightweight copy of these parameters, sharing representations for variable-length datatypes.

Definition at line 169 of file parameters.cpp.

References fBound, fSet, ITERATE, impl::CDB_Params::SParam::m_Name, impl::CDB_Params::SParam::m_Param, m_Params, impl::CDB_Params::SParam::m_Status, NULL, and result.

Referenced by impl::CDBBindedParams::SemiShallowClone().

◆ SetParam()

bool impl::CDB_Params::SetParam ( unsigned int  param_no,
const string param_name,
CDB_Object param,
bool  is_out = false 
)

Definition at line 160 of file parameters.cpp.

References GetParamNum(), and m_Params.

Referenced by impl::CDBBindedParams::Set().

Member Data Documentation

◆ m_Locked

bool impl::CDB_Params::m_Locked
private

Definition at line 123 of file parameters.hpp.

Referenced by IsLocked(), and LockBinding().

◆ m_Params

deque<SParam> impl::CDB_Params::m_Params
private

The documentation for this class was generated from the following files:
Modified on Tue Apr 23 07:36:51 2024 by modify_doxy.py rev. 669887