| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DbiFieldType Class Reference

Id
DbiFieldType.h,v 1.16 2007/04/26 14:19:57 west Exp
More...

#include <DbiFieldType.h>

List of all members.


Public Types

 kMaxTinyInt = 4
 kMaxSmallInt = 6
 kMaxInt = 11
 kMaxChar = 3
 kMaxOracleFloat = 32
 kMaxMySQLVarchar = 255
 kMaxOracleVarchar = 4000
 kMaxMySQLText = 65535
enum  PrecisionLimits {
  kMaxTinyInt = 4, kMaxSmallInt = 6, kMaxInt = 11, kMaxChar = 3,
  kMaxOracleFloat = 32, kMaxMySQLVarchar = 255, kMaxOracleVarchar = 4000, kMaxMySQLText = 65535
}

Public Member Functions

 DbiFieldType (Int_t type=Dbi::kInt)
 DbiFieldType (Int_t type, Int_t size, const char *typeName)
 DbiFieldType (const DbiFieldType &from)
 DbiFieldType (const string &sql, Int_t size)
virtual ~DbiFieldType ()
string AsString () const
string AsSQLString (Dbi::DbTypes dbType=Dbi::kMySQL) const
string UndefinedValue () const
UInt_t GetConcept () const
UInt_t GetSize () const
UInt_t GetType () const
Bool_t IsCompatible (const DbiFieldType &other) const
Bool_t IsEqual (const DbiFieldType &other) const
Bool_t IsSmaller (const DbiFieldType &other) const
Bool_t IsSigned () const
void SetUnsigned ()

Private Member Functions

void Init (Int_t type, Int_t size=-1)

Private Attributes

unsigned int fConcept
 Concept e.g. kInt or kFloat.
unsigned int fSize
 Size in bytes(0 if unknown).
unsigned int fType
 Concept e.g. kShort or kDouble.

Detailed Description

Id
DbiFieldType.h,v 1.16 2007/04/26 14:19:57 west Exp

Definition at line 35 of file DbiFieldType.h.


Member Enumeration Documentation

enum DbiFieldType::PrecisionLimits

Enumerator:
kMaxTinyInt 
kMaxSmallInt 
kMaxInt 
kMaxChar 
kMaxOracleFloat 
kMaxMySQLVarchar 
kMaxOracleVarchar 
kMaxMySQLText 

Definition at line 41 of file DbiFieldType.h.

00041                      { kMaxTinyInt       = 4,
00042                        kMaxSmallInt      = 6,
00043                        kMaxInt           = 11,
00044                        kMaxChar          = 3,
00045                        kMaxOracleFloat   = 32,
00046                        kMaxMySQLVarchar  = 255,
00047                        kMaxOracleVarchar = 4000,
00048                        kMaxMySQLText     = 65535
00049 };


Constructor & Destructor Documentation

DbiFieldType::DbiFieldType ( Int_t  type = Dbi::kInt  ) 

DbiFieldType::DbiFieldType ( Int_t  type,
Int_t  size,
const char *  typeName 
)

DbiFieldType::DbiFieldType ( const DbiFieldType from  ) 

DbiFieldType::DbiFieldType ( const string &  sql,
Int_t  size 
)

virtual DbiFieldType::~DbiFieldType (  )  [virtual]


Member Function Documentation

string DbiFieldType::AsString (  )  const

string DbiFieldType::AsSQLString ( Dbi::DbTypes  dbType = Dbi::kMySQL  )  const

string DbiFieldType::UndefinedValue (  )  const

UInt_t DbiFieldType::GetConcept (  )  const [inline]

Definition at line 66 of file DbiFieldType.h.

00066 { return fConcept; }

UInt_t DbiFieldType::GetSize (  )  const [inline]

Definition at line 67 of file DbiFieldType.h.

00067 { return fSize; }

UInt_t DbiFieldType::GetType (  )  const [inline]

Definition at line 68 of file DbiFieldType.h.

00068 { return fType; }

Bool_t DbiFieldType::IsCompatible ( const DbiFieldType other  )  const

Bool_t DbiFieldType::IsEqual ( const DbiFieldType other  )  const [inline]

Definition at line 70 of file DbiFieldType.h.

00071                                         { return fType == other.fType; }

Bool_t DbiFieldType::IsSmaller ( const DbiFieldType other  )  const [inline]

Definition at line 72 of file DbiFieldType.h.

00073                                   { return fSize < other.fSize; }

Bool_t DbiFieldType::IsSigned (  )  const [inline]

Definition at line 74 of file DbiFieldType.h.

00074 { return fConcept ==  Dbi::kInt; }

void DbiFieldType::SetUnsigned (  )  [inline]

Definition at line 79 of file DbiFieldType.h.

00079 {if (this->IsSigned()) {++fConcept; ++fType;}}

void DbiFieldType::Init ( Int_t  type,
Int_t  size = -1 
) [private]


Member Data Documentation

unsigned int DbiFieldType::fConcept [private]

Concept e.g. kInt or kFloat.

Definition at line 88 of file DbiFieldType.h.

unsigned int DbiFieldType::fSize [private]

Size in bytes(0 if unknown).

Definition at line 90 of file DbiFieldType.h.

unsigned int DbiFieldType::fType [private]

Concept e.g. kShort or kDouble.

Definition at line 92 of file DbiFieldType.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:15:48 2011 for DatabaseInterface by doxygen 1.4.7