EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbFieldType Class Reference

#include <EicRoot/blob/master/dbase/dbInterface/FairDbFieldType.h>

Public Types

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

Public Member Functions

 FairDbFieldType (Int_t type=FairDb::kInt)
 
 FairDbFieldType (Int_t type, Int_t size, const char *typeName)
 
 FairDbFieldType (const FairDbFieldType &from)
 
 FairDbFieldType (const string &sql, Int_t size)
 
virtual ~FairDbFieldType ()
 
string AsString () const
 
string AsSQLString (FairDb::DbTypes dbType=FairDb::kMySQL) const
 
string UndefinedValue () const
 
UInt_t GetConcept () const
 
UInt_t GetSize () const
 
UInt_t GetType () const
 
Bool_t IsCompatible (const FairDbFieldType &other) const
 
Bool_t IsEqual (const FairDbFieldType &other) const
 
Bool_t IsSmaller (const FairDbFieldType &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
 
unsigned int fSize
 
unsigned int fType
 

Detailed Description

Definition at line 11 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 11 of file FairDbFieldType.h

Member Enumeration Documentation

Enumerator:
kMaxTinyInt 
kMaxSmallInt 
kMaxInt 
kMaxChar 
kMaxOracleFloat 
kMaxMySQLVarchar 
kMaxOracleVarchar 
kMaxMySQLText 

Definition at line 15 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 15 of file FairDbFieldType.h

Constructor & Destructor Documentation

FairDbFieldType::FairDbFieldType ( Int_t  type = FairDb::kInt)
FairDbFieldType::FairDbFieldType ( Int_t  type,
Int_t  size,
const char *  typeName 
)

Definition at line 22 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 22 of file FairDbFieldType.cxx

References Init(), FairDb::kChar, FairDb::kDate, FairDb::kDouble, FairDb::kFloat, FairDb::kInt, FairDb::kLong, kMaxChar, kMaxInt, kMaxMySQLText, kMaxMySQLVarchar, kMaxSmallInt, kMaxTinyInt, FairDb::kShort, FairDb::kString, FairDb::kTiny, FairDb::kUnknown, and name.

+ Here is the call graph for this function:

FairDbFieldType::FairDbFieldType ( const FairDbFieldType from)

Definition at line 84 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 84 of file FairDbFieldType.cxx

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

Definition at line 94 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 94 of file FairDbFieldType.cxx

References fSize, Init(), FairDb::kChar, FairDb::kDate, FairDb::kDouble, FairDb::kFloat, FairDb::kInt, FairDb::kLong, kMaxChar, kMaxMySQLText, kMaxMySQLVarchar, FairDb::kShort, FairDb::kString, FairDb::kTiny, and FairDb::kUnknown.

+ Here is the call graph for this function:

FairDbFieldType::~FairDbFieldType ( )
virtual

Definition at line 145 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 145 of file FairDbFieldType.cxx

Member Function Documentation

string FairDbFieldType::AsSQLString ( FairDb::DbTypes  dbType = FairDb::kMySQL) const

Definition at line 193 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 193 of file FairDbFieldType.cxx

References fSize, fType, FairDb::kBool, FairDb::kChar, FairDb::kDate, FairDb::kDouble, FairDb::kFloat, FairDb::kInt, FairDb::kLong, kMaxChar, kMaxMySQLVarchar, kMaxOracleVarchar, FairDb::kOracle, FairDb::kShort, FairDb::kString, FairDb::kTiny, FairDb::kTString, FairDb::kUChar, FairDb::kUInt, FairDb::kULong, FairDb::kUShort, and FairDb::kUTiny.

Referenced by FairDbTableMetaData::Sql().

+ Here is the caller graph for this function:

string FairDbFieldType::AsString ( ) const

Definition at line 152 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 152 of file FairDbFieldType.cxx

References fType, FairDb::kBool, FairDb::kChar, FairDb::kDate, FairDb::kDouble, FairDb::kFloat, FairDb::kInt, FairDb::kLong, FairDb::kShort, FairDb::kString, FairDb::kTiny, FairDb::kTString, FairDb::kUChar, FairDb::kUInt, FairDb::kULong, FairDb::kUShort, and FairDb::kUTiny.

Referenced by FairDbResultSet::AsString(), operator<<(), FairDbTableMetaData::SetFromSql(), and FairDbOutRowStream::StoreDefaultIfInvalid().

+ Here is the caller graph for this function:

UInt_t FairDbFieldType::GetConcept ( ) const
inline

Definition at line 39 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 39 of file FairDbFieldType.h

References fConcept.

Referenced by FairDbResultSet::AsString(), IsCompatible(), FairDbProxy::ReplaceSeqNoOracle(), FairDbTableMetaData::SetColFieldType(), and FairDbOutRowStream::Store().

+ Here is the caller graph for this function:

UInt_t FairDbFieldType::GetSize ( ) const
inline

Definition at line 40 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 40 of file FairDbFieldType.h

References fSize.

UInt_t FairDbFieldType::GetType ( ) const
inline

Definition at line 41 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 41 of file FairDbFieldType.h

References fType.

Referenced by FairDbResultSet::RowAsCsv().

+ Here is the caller graph for this function:

void FairDbFieldType::Init ( Int_t  type,
Int_t  size = -1 
)
private

Definition at line 326 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 326 of file FairDbFieldType.cxx

References fConcept, fSize, fType, FairDb::kBool, FairDb::kChar, FairDb::kDate, FairDb::kDouble, FairDb::kFloat, FairDb::kInt, FairDb::kLong, FairDb::kShort, FairDb::kString, FairDb::kTiny, FairDb::kTString, FairDb::kUChar, FairDb::kUInt, FairDb::kULong, FairDb::kUnknown, FairDb::kUShort, and FairDb::kUTiny.

Referenced by FairDbFieldType().

+ Here is the caller graph for this function:

Bool_t FairDbFieldType::IsCompatible ( const FairDbFieldType other) const

Definition at line 449 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 449 of file FairDbFieldType.cxx

References fConcept, GetConcept(), FairDb::kBool, FairDb::kChar, FairDb::kInt, FairDb::kString, FairDb::kUChar, FairDb::kUInt, and MATCHES.

Referenced by FairDbResultSet::AsString(), and FairDbOutRowStream::StoreDefaultIfInvalid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t FairDbFieldType::IsEqual ( const FairDbFieldType other) const
inline

Definition at line 43 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 43 of file FairDbFieldType.h

References fType.

Bool_t FairDbFieldType::IsSigned ( ) const
inline

Definition at line 47 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 47 of file FairDbFieldType.h

References fConcept, and FairDb::kInt.

Referenced by SetUnsigned().

+ Here is the caller graph for this function:

Bool_t FairDbFieldType::IsSmaller ( const FairDbFieldType other) const
inline

Definition at line 45 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 45 of file FairDbFieldType.h

References fSize.

Referenced by FairDbResultSet::AsString().

+ Here is the caller graph for this function:

void FairDbFieldType::SetUnsigned ( )
inline

Definition at line 50 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 50 of file FairDbFieldType.h

References fConcept, fType, and IsSigned().

Referenced by FairDbProxy::StoreMetaData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbFieldType::UndefinedValue ( ) const

Definition at line 475 of file FairDbFieldType.cxx.

View newest version in sPHENIX GitHub at line 475 of file FairDbFieldType.cxx

References fConcept, FairDb::kBool, FairDb::kChar, FairDb::kDate, FairDb::kFloat, FairDb::kInt, FairDb::kString, FairDb::kUChar, and FairDb::kUInt.

Referenced by FairDbResultSet::AsString(), and FairDbOutRowStream::StoreDefaultIfInvalid().

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int FairDbFieldType::fConcept
private

Definition at line 56 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 56 of file FairDbFieldType.h

Referenced by GetConcept(), Init(), IsCompatible(), IsSigned(), SetUnsigned(), and UndefinedValue().

unsigned int FairDbFieldType::fSize
private

Definition at line 57 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 57 of file FairDbFieldType.h

Referenced by AsSQLString(), FairDbFieldType(), GetSize(), Init(), and IsSmaller().

unsigned int FairDbFieldType::fType
private

Definition at line 58 of file FairDbFieldType.h.

View newest version in sPHENIX GitHub at line 58 of file FairDbFieldType.h

Referenced by AsSQLString(), AsString(), GetType(), Init(), IsEqual(), and SetUnsigned().


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