NCBI C++ ToolKit
Classes | Enumerations | Enumerator | Functions | Variables
Variant exception and data type
+ Collaboration diagram for Variant exception and data type:

Classes

class  CVariantException
 
class  CVariant
 CVariant –. More...
 

Enumerations

enum  CVariantException::EErrCode { CVariantException::eVariant }
 
enum  EDateTimeFormat {
  eShort , eLong , eLonger , eDateOnly ,
  eTimeOnly , eDateTimeOffset
}
 

Functions

 CVariantException::CVariantException (const string &message)
 
virtual const char * CVariantException::GetErrCodeString (void) const override
 
 CVariantException::NCBI_EXCEPTION_DEFAULT (CVariantException, CException)
 
 CVariant::CVariant (Int8 v)
 
 CVariant::CVariant (Int4 v)
 
 CVariant::CVariant (Int2 v)
 
 CVariant::CVariant (Uint1 v)
 
 CVariant::CVariant (float v)
 
 CVariant::CVariant (double v)
 
 CVariant::CVariant (bool v)
 
 CVariant::CVariant (const string &v)
 
 CVariant::CVariant (const char *s)
 
 CVariant::CVariant (const TStringUCS2 &v)
 
static CVariant CVariant::BigInt (Int8 *p)
 
static CVariant CVariant::BigInt (const CNullable< Int8 > &n)
 
static CVariant CVariant::Int (Int4 *p)
 
static CVariant CVariant::Int (const CNullable< Int4 > &n)
 
static CVariant CVariant::SmallInt (Int2 *p)
 
static CVariant CVariant::SmallInt (const CNullable< Int2 > &n)
 
static CVariant CVariant::TinyInt (Uint1 *p)
 
static CVariant CVariant::TinyInt (const CNullable< Uint1 > &n)
 
static CVariant CVariant::Float (float *p)
 
static CVariant CVariant::Float (const CNullable< float > &x)
 
static CVariant CVariant::Double (double *p)
 
static CVariant CVariant::Double (const CNullable< double > &x)
 
static CVariant CVariant::Bit (bool *p)
 
static CVariant CVariant::Bit (const CNullable< bool > &b)
 
static CVariant CVariant::LongChar (const char *p, size_t len=0)
 
static CVariant CVariant::LongChar (const CNullable< const TStringUCS2 & > &s, size_t len=0)
 
static CVariant CVariant::VarChar (const char *p, size_t len=0)
 
static CVariant CVariant::VarChar (const CNullable< const TStringUCS2 & > &s, size_t len=0)
 
static CVariant CVariant::VarCharMax (const char *p, size_t len=0)
 
static CVariant CVariant::VarCharMax (const CNullable< const TStringUCS2 & > &s, size_t len=0)
 
static CVariant CVariant::Char (size_t size, const char *p)
 
static CVariant CVariant::Char (size_t size, const CNullable< const TStringUCS2 & > &s)
 
static CVariant CVariant::LongBinary (size_t maxSize, const void *p, size_t len)
 
static CVariant CVariant::VarBinary (const void *p, size_t len)
 
static CVariant CVariant::VarBinaryMax (const void *p, size_t len)
 
static CVariant CVariant::Binary (size_t size, const void *p, size_t len)
 
static CVariant CVariant::SmallDateTime (CTime *p)
 
static CVariant CVariant::SmallDateTime (const CNullable< const CTime & > &t)
 
static CVariant CVariant::DateTime (CTime *p)
 
static CVariant CVariant::DateTime (const CNullable< const CTime & > &t)
 
static CVariant CVariant::BigDateTime (CTime *p, EDateTimeFormat fmt=eLonger)
 
static CVariant CVariant::BigDateTime (const CNullable< const CTime & > &t, EDateTimeFormat fmt=eLonger)
 
static CVariant CVariant::Numeric (unsigned int precision, unsigned int scale, const char *p)
 
 CVariant::CVariant (EDB_Type type, size_t size=0)
 
 CVariant::CVariant (const class CTime &v, EDateTimeFormat fmt)
 
 CVariant::CVariant (CDB_Object *obj)
 
 CVariant::CVariant (const CVariant &v)
 
 CVariant::~CVariant ()
 
EDB_Type CVariant::GetType () const
 
Int8 CVariant::GetInt8 (void) const
 
string CVariant::GetString (void) const
 
Int4 CVariant::GetInt4 (void) const
 
Int2 CVariant::GetInt2 (void) const
 
Uint1 CVariant::GetByte (void) const
 
float CVariant::GetFloat (void) const
 
double CVariant::GetDouble (void) const
 
bool CVariant::GetBit (void) const
 
string CVariant::GetNumeric (void) const
 
const CTimeCVariant::GetCTime (void) const
 
string CVariant::AsNotNullString (const string &v) const
 
bool CVariant::IsNull () const
 
void CVariant::SetNull ()
 
CVariantCVariant::operator= (const CVariant &v)
 
CVariantCVariant::operator= (const Int8 &v)
 
CVariantCVariant::operator= (const Int4 &v)
 
CVariantCVariant::operator= (const Int2 &v)
 
CVariantCVariant::operator= (const Uint1 &v)
 
CVariantCVariant::operator= (const float &v)
 
CVariantCVariant::operator= (const double &v)
 
CVariantCVariant::operator= (const string &v)
 
CVariantCVariant::operator= (const char *v)
 
CVariantCVariant::operator= (const TStringUCS2 &v)
 
CVariantCVariant::operator= (const bool &v)
 
CVariantCVariant::operator= (const CTime &v)
 
CDB_ObjectCVariant::GetData () const
 
CDB_ObjectCVariant::GetNonNullData () const
 
size_t CVariant::GetBlobSize () const
 
size_t CVariant::Read (void *buf, size_t len) const
 
size_t CVariant::Append (const void *buf, size_t len)
 
size_t CVariant::Append (const string &str)
 
size_t CVariant::Append (const TStringUCS2 &str)
 
void CVariant::Truncate (size_t len=kMax_UInt)
 
bool CVariant::MoveTo (size_t pos) const
 
void CVariant::SetBlobDescriptor (I_BlobDescriptor *descr)
 
I_BlobDescriptorCVariant::GetBlobDescriptor (void) const
 
I_BlobDescriptorCVariant::ReleaseBlobDescriptor (void) const
 
void CVariant::SetITDescriptor (I_BlobDescriptor *descr)
 
I_BlobDescriptorCVariant::GetITDescriptor (void) const
 
I_BlobDescriptorCVariant::ReleaseITDescriptor (void) const
 
EBulkEnc CVariant::GetBulkInsertionEnc (void) const
 
void CVariant::SetBulkInsertionEnc (EBulkEnc e)
 
void CVariant::SetData (CDB_Object *o)
 
void CVariant::CheckNull () const
 
void CVariant::x_Verify_AssignType (EDB_Type db_type, const char *cxx_type) const
 
void CVariant::x_Inapplicable_Method (const char *method) const
 
bool operator== (const CVariant &v1, const CVariant &v2)
 
bool operator< (const CVariant &v1, const CVariant &v2)
 
bool operator!= (const CVariant &v1, const CVariant &v2)
 
bool operator> (const CVariant &v1, const CVariant &v2)
 
bool operator<= (const CVariant &v1, const CVariant &v2)
 
bool operator>= (const CVariant &v1, const CVariant &v2)
 

Variables

class CDB_ObjectCVariant::m_data
 
unique_ptr< I_BlobDescriptorCVariant::m_descr
 

Detailed Description

Enumeration Type Documentation

◆ EDateTimeFormat

Enumerator
eShort 
eLong 
eLonger 
eDateOnly 
eTimeOnly 
eDateTimeOffset 

Definition at line 81 of file variant.hpp.

◆ EErrCode

Enumerator
eVariant 

Definition at line 62 of file variant.hpp.

Function Documentation

◆ Append() [1/3]

size_t CVariant::Append ( const string str)

◆ Append() [2/3]

size_t CVariant::Append ( const TStringUCS2 str)

◆ Append() [3/3]

size_t CVariant::Append ( const void *  buf,
size_t  len 
)

◆ AsNotNullString()

string CVariant::AsNotNullString ( const string v) const

Definition at line 721 of file variant.cpp.

References CVariant::GetString(), and CVariant::IsNull().

◆ BigDateTime() [1/2]

CVariant CVariant::BigDateTime ( const CNullable< const CTime & > &  t,
EDateTimeFormat  fmt = eLonger 
)
static

Definition at line 243 of file variant.cpp.

References CVariant::CVariant(), CTime::eEmpty, s_TranslateDateTimeFormat(), and t.

◆ BigDateTime() [2/2]

CVariant CVariant::BigDateTime ( CTime p,
EDateTimeFormat  fmt = eLonger 
)
static

Definition at line 236 of file variant.cpp.

References CVariant::CVariant(), CTime::eEmpty, and s_TranslateDateTimeFormat().

◆ BigInt() [1/2]

CVariant CVariant::BigInt ( const CNullable< Int8 > &  n)
static

Definition at line 70 of file variant.cpp.

References CVariant::CVariant(), and n.

◆ BigInt() [2/2]

CVariant CVariant::BigInt ( Int8 p)
static

Definition at line 65 of file variant.cpp.

References CVariant::CVariant().

◆ Binary()

CVariant CVariant::Binary ( size_t  size,
const void *  p,
size_t  len 
)
static

Definition at line 196 of file variant.cpp.

References CVariant::CVariant(), len, and ncbi::grid::netcache::search::fields::size.

Referenced by CResultSet::Init().

◆ Bit() [1/2]

CVariant CVariant::Bit ( bool p)
static

Definition at line 125 of file variant.cpp.

References CVariant::CVariant().

◆ Bit() [2/2]

CVariant CVariant::Bit ( const CNullable< bool > &  b)
static

Definition at line 130 of file variant.cpp.

References b, and CVariant::CVariant().

◆ Char() [1/2]

CVariant CVariant::Char ( size_t  size,
const char *  p 
)
static

Definition at line 171 of file variant.cpp.

References CVariant::CVariant(), and ncbi::grid::netcache::search::fields::size.

Referenced by CResultSet::Init().

◆ Char() [2/2]

CVariant CVariant::Char ( size_t  size,
const CNullable< const TStringUCS2 & > &  s 
)
static

◆ CheckNull()

void CVariant::CheckNull ( ) const
private

◆ CVariant() [1/14]

CVariant::CVariant ( bool  v)
explicit

Definition at line 386 of file variant.cpp.

◆ CVariant() [2/14]

CVariant::CVariant ( CDB_Object obj)
explicit

Definition at line 357 of file variant.cpp.

◆ CVariant() [3/14]

CVariant::CVariant ( const char *  s)
explicit

Definition at line 394 of file variant.cpp.

◆ CVariant() [4/14]

CVariant::CVariant ( const class CTime v,
EDateTimeFormat  fmt 
)

◆ CVariant() [5/14]

CVariant::CVariant ( const CVariant v)

Definition at line 439 of file variant.cpp.

References CDB_Object::Clone(), CVariant::GetData(), and CVariant::m_data.

◆ CVariant() [6/14]

CVariant::CVariant ( const string v)
explicit

Definition at line 389 of file variant.cpp.

◆ CVariant() [7/14]

CVariant::CVariant ( const TStringUCS2 v)
explicit

Definition at line 399 of file variant.cpp.

◆ CVariant() [8/14]

CVariant::CVariant ( double  v)
explicit

Definition at line 383 of file variant.cpp.

◆ CVariant() [9/14]

CVariant::CVariant ( EDB_Type  type,
size_t  size = 0 
)

◆ CVariant() [10/14]

CVariant::CVariant ( float  v)
explicit

Definition at line 380 of file variant.cpp.

◆ CVariant() [11/14]

CVariant::CVariant ( Int2  v)
explicit

Definition at line 374 of file variant.cpp.

◆ CVariant() [12/14]

CVariant::CVariant ( Int4  v)
explicit

Definition at line 368 of file variant.cpp.

◆ CVariant() [13/14]

CVariant::CVariant ( Int8  v)
explicit

Definition at line 364 of file variant.cpp.

◆ CVariant() [14/14]

CVariant::CVariant ( Uint1  v)
explicit

Definition at line 377 of file variant.cpp.

◆ CVariantException()

CVariantException::CVariantException ( const string message)

Definition at line 49 of file variant.cpp.

◆ DateTime() [1/2]

CVariant CVariant::DateTime ( const CNullable< const CTime & > &  t)
static

Definition at line 217 of file variant.cpp.

References CVariant::CVariant(), and t.

◆ DateTime() [2/2]

CVariant CVariant::DateTime ( CTime p)
static

Definition at line 212 of file variant.cpp.

References CVariant::CVariant().

◆ Double() [1/2]

CVariant CVariant::Double ( const CNullable< double > &  x)
static

◆ Double() [2/2]

CVariant CVariant::Double ( double *  p)
static

Definition at line 115 of file variant.cpp.

References CVariant::CVariant().

◆ Float() [1/2]

CVariant CVariant::Float ( const CNullable< float > &  x)
static

◆ Float() [2/2]

CVariant CVariant::Float ( float *  p)
static

Definition at line 105 of file variant.cpp.

References CVariant::CVariant().

Referenced by CDbapiTest::Run().

◆ GetBit()

bool CVariant::GetBit ( void  ) const

◆ GetBlobDescriptor()

I_BlobDescriptor & CVariant::GetBlobDescriptor ( void  ) const
inline

Definition at line 301 of file variant.hpp.

References eRetriable_No, CVariant::m_descr, NCBI_THROW, and NULL.

Referenced by CVariant::GetITDescriptor(), and CRemoteQFB::GetOStream().

◆ GetBlobSize()

size_t CVariant::GetBlobSize ( ) const

◆ GetBulkInsertionEnc()

EBulkEnc CVariant::GetBulkInsertionEnc ( void  ) const

◆ GetByte()

Uint1 CVariant::GetByte ( void  ) const

◆ GetCTime()

const CTime & CVariant::GetCTime ( void  ) const

◆ GetData()

CDB_Object * CVariant::GetData ( void  ) const
inline

◆ GetDouble()

double CVariant::GetDouble ( void  ) const

◆ GetErrCodeString()

const char * CVariantException::GetErrCodeString ( void  ) const
overridevirtual

Definition at line 55 of file variant.cpp.

References CVariantException::eVariant, and CException::GetErrCodeString().

◆ GetFloat()

float CVariant::GetFloat ( void  ) const

◆ GetInt2()

Int2 CVariant::GetInt2 ( void  ) const

◆ GetInt4()

Int4 CVariant::GetInt4 ( void  ) const

◆ GetInt8()

Int8 CVariant::GetInt8 ( void  ) const

◆ GetITDescriptor()

I_BlobDescriptor& CVariant::GetITDescriptor ( void  ) const
inline

Definition at line 237 of file variant.hpp.

References CVariant::GetBlobDescriptor().

◆ GetNonNullData()

CDB_Object * CVariant::GetNonNullData ( ) const

Definition at line 456 of file variant.cpp.

References eRetriable_No, CVariant::m_data, and NCBI_THROW.

Referenced by CResultSet::x_CacheItems().

◆ GetNumeric()

string CVariant::GetNumeric ( void  ) const

◆ GetString()

string CVariant::GetString ( void  ) const

◆ GetType()

EDB_Type CVariant::GetType ( void  ) const
inline

◆ Int() [1/2]

CVariant CVariant::Int ( const CNullable< Int4 > &  n)
static

Definition at line 80 of file variant.cpp.

References CVariant::CVariant(), and n.

◆ Int() [2/2]

CVariant CVariant::Int ( Int4 p)
static

Definition at line 75 of file variant.cpp.

References CVariant::CVariant().

◆ IsNull()

bool CVariant::IsNull ( void  ) const

◆ LongBinary()

CVariant CVariant::LongBinary ( size_t  maxSize,
const void *  p,
size_t  len 
)
static

Definition at line 181 of file variant.cpp.

References CVariant::CVariant(), and len.

Referenced by CResultSet::Init().

◆ LongChar() [1/2]

CVariant CVariant::LongChar ( const char *  p,
size_t  len = 0 
)
static

Definition at line 135 of file variant.cpp.

References CVariant::CVariant(), and len.

Referenced by CResultSet::Init().

◆ LongChar() [2/2]

CVariant CVariant::LongChar ( const CNullable< const TStringUCS2 & > &  s,
size_t  len = 0 
)
static

◆ MoveTo()

bool CVariant::MoveTo ( size_t  pos) const

◆ NCBI_EXCEPTION_DEFAULT()

CVariantException::NCBI_EXCEPTION_DEFAULT ( CVariantException  ,
CException   
)

◆ Numeric()

CVariant CVariant::Numeric ( unsigned int  precision,
unsigned int  scale,
const char *  p 
)
static

Definition at line 251 of file variant.cpp.

References CVariant::CVariant(), and precision.

◆ operator!=()

bool operator!= ( const CVariant v1,
const CVariant v2 
)
inline

Definition at line 336 of file variant.hpp.

References v2.

◆ operator<()

bool operator< ( const CVariant v1,
const CVariant v2 
)

◆ operator<=()

bool operator<= ( const CVariant v1,
const CVariant v2 
)
inline

Definition at line 348 of file variant.hpp.

References v2.

◆ operator=() [1/12]

CVariant & CVariant::operator= ( const bool v)

Definition at line 918 of file variant.cpp.

References eDB_Bit, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [2/12]

CVariant & CVariant::operator= ( const char *  v)

◆ operator=() [3/12]

CVariant & CVariant::operator= ( const CTime v)

◆ operator=() [4/12]

CVariant & CVariant::operator= ( const CVariant v)

Definition at line 943 of file variant.cpp.

References CDB_Object::AssignValue(), and CVariant::m_data.

◆ operator=() [5/12]

CVariant & CVariant::operator= ( const double &  v)

Definition at line 858 of file variant.cpp.

References eDB_Double, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [6/12]

CVariant & CVariant::operator= ( const float &  v)

Definition at line 851 of file variant.cpp.

References eDB_Float, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [7/12]

CVariant & CVariant::operator= ( const Int2 v)

Definition at line 837 of file variant.cpp.

References eDB_SmallInt, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [8/12]

CVariant & CVariant::operator= ( const Int4 v)

Definition at line 830 of file variant.cpp.

References eDB_Int, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [9/12]

CVariant & CVariant::operator= ( const Int8 v)

Definition at line 823 of file variant.cpp.

References eDB_BigInt, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator=() [10/12]

CVariant & CVariant::operator= ( const string v)

◆ operator=() [11/12]

CVariant & CVariant::operator= ( const TStringUCS2 v)

◆ operator=() [12/12]

CVariant & CVariant::operator= ( const Uint1 v)

Definition at line 844 of file variant.cpp.

References eDB_TinyInt, CVariant::GetData(), and CVariant::x_Verify_AssignType().

◆ operator==()

bool operator== ( const CVariant v1,
const CVariant v2 
)

◆ operator>()

bool operator> ( const CVariant v1,
const CVariant v2 
)
inline

Definition at line 342 of file variant.hpp.

References v2.

◆ operator>=()

bool operator>= ( const CVariant v1,
const CVariant v2 
)
inline

Definition at line 354 of file variant.hpp.

References v2.

◆ Read()

size_t CVariant::Read ( void *  buf,
size_t  len 
) const

◆ ReleaseBlobDescriptor()

I_BlobDescriptor * CVariant::ReleaseBlobDescriptor ( void  ) const
inline

Definition at line 311 of file variant.hpp.

References CVariant::m_descr.

Referenced by CRemoteQFB::GetBookmark(), and CVariant::ReleaseITDescriptor().

◆ ReleaseITDescriptor()

I_BlobDescriptor* CVariant::ReleaseITDescriptor ( void  ) const
inline

Definition at line 239 of file variant.hpp.

References CVariant::ReleaseBlobDescriptor().

◆ SetBlobDescriptor()

void CVariant::SetBlobDescriptor ( I_BlobDescriptor descr)
inline

Definition at line 295 of file variant.hpp.

References CVariant::m_descr.

Referenced by CVariant::SetITDescriptor(), and CResultSet::x_CacheItems().

◆ SetBulkInsertionEnc()

void CVariant::SetBulkInsertionEnc ( EBulkEnc  e)

◆ SetData()

void CVariant::SetData ( CDB_Object o)
protected

Definition at line 464 of file variant.cpp.

References CVariant::m_data.

◆ SetITDescriptor()

void CVariant::SetITDescriptor ( I_BlobDescriptor descr)
inline

Definition at line 236 of file variant.hpp.

References CVariant::SetBlobDescriptor().

◆ SetNull()

void CVariant::SetNull ( )

Definition at line 734 of file variant.cpp.

References CDB_Object::AssignNULL(), and CVariant::GetData().

◆ SmallDateTime() [1/2]

CVariant CVariant::SmallDateTime ( const CNullable< const CTime & > &  t)
static

Definition at line 206 of file variant.cpp.

References CVariant::CVariant(), and t.

◆ SmallDateTime() [2/2]

CVariant CVariant::SmallDateTime ( CTime p)
static

Definition at line 201 of file variant.cpp.

References CVariant::CVariant().

◆ SmallInt() [1/2]

CVariant CVariant::SmallInt ( const CNullable< Int2 > &  n)
static

Definition at line 90 of file variant.cpp.

References CVariant::CVariant(), and n.

◆ SmallInt() [2/2]

CVariant CVariant::SmallInt ( Int2 p)
static

Definition at line 85 of file variant.cpp.

References CVariant::CVariant().

◆ TinyInt() [1/2]

CVariant CVariant::TinyInt ( const CNullable< Uint1 > &  n)
static

Definition at line 100 of file variant.cpp.

References CVariant::CVariant(), and n.

◆ TinyInt() [2/2]

CVariant CVariant::TinyInt ( Uint1 p)
static

Definition at line 95 of file variant.cpp.

References CVariant::CVariant().

◆ Truncate()

void CVariant::Truncate ( size_t  len = kMax_UInt)

◆ VarBinary()

CVariant CVariant::VarBinary ( const void *  p,
size_t  len 
)
static

Definition at line 186 of file variant.cpp.

References CVariant::CVariant(), and len.

Referenced by python::CCursor::GetCVariant(), and s_ConvertValue().

◆ VarBinaryMax()

CVariant CVariant::VarBinaryMax ( const void *  p,
size_t  len 
)
static

Definition at line 191 of file variant.cpp.

References CVariant::CVariant(), and len.

◆ VarChar() [1/2]

CVariant CVariant::VarChar ( const char *  p,
size_t  len = 0 
)
static

Definition at line 146 of file variant.cpp.

References CVariant::CVariant(), and len.

◆ VarChar() [2/2]

CVariant CVariant::VarChar ( const CNullable< const TStringUCS2 & > &  s,
size_t  len = 0 
)
static

◆ VarCharMax() [1/2]

CVariant CVariant::VarCharMax ( const char *  p,
size_t  len = 0 
)
static

Definition at line 157 of file variant.cpp.

References CVariant::CVariant(), and len.

◆ VarCharMax() [2/2]

CVariant CVariant::VarCharMax ( const CNullable< const TStringUCS2 & > &  s,
size_t  len = 0 
)
static

◆ x_Inapplicable_Method()

void CVariant::x_Inapplicable_Method ( const char *  method) const
inlineprivate

◆ x_Verify_AssignType()

void CVariant::x_Verify_AssignType ( EDB_Type  db_type,
const char *  cxx_type 
) const
inlineprivate

◆ ~CVariant()

CVariant::~CVariant ( void  )

Definition at line 447 of file variant.cpp.

References kEmptyStr, CVariant::m_data, and NCBI_CATCH_ALL_X.

Variable Documentation

◆ m_data

class CDB_Object* CVariant::m_data
private

◆ m_descr

unique_ptr<I_BlobDescriptor> CVariant::m_descr
mutableprivate
Modified on Fri Sep 20 14:57:58 2024 by modify_doxy.py rev. 669887