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

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

+ Collaboration diagram for FairDbTableMetaData:

Classes

struct  ColumnAttributes
 Column attributes. More...
 

Public Member Functions

 FairDbTableMetaData (const string &tableName="Unknown")
 
virtual ~FairDbTableMetaData ()
 
string Sql (FairDb::DbTypes dbType=FairDb::kMySQL) const
 
string TableName () const
 
Bool_t HasRowCounter () const
 
UInt_t NumCols () const
 
const FairDbFieldTypeColFieldType (Int_t colNum) const
 
UInt_t ColFieldConcept (Int_t colNum) const
 
Bool_t ColIsNullable (Int_t colNum) const
 
Bool_t ColMustDelimit (Int_t colNum) const
 
string ColName (Int_t colNum) const
 
void SetFromSql (const string &sql)
 

Protected Member Functions

void Clear ()
 
void SetColIsNullable (Int_t colNum, Bool_t isNullable=true)
 
void SetColName (const string &name, Int_t colNum)
 
void SetColFieldType (const FairDbFieldType &type, Int_t colNum)
 

Private Types

enum  { MAXCOL = 1000 }
 

Private Member Functions

void ExpandTo (UInt_t colNum)
 
const ColumnAttributesGetAttributes (Int_t colNum) const
 
ColumnAttributesSetAttributes (Int_t colNum)
 

Static Private Member Functions

static string GetToken (const char *&strPtr)
 

Private Attributes

std::vector< ColumnAttributesfColAttr
 
UInt_t fNumCols
 
string fTableName
 

Static Private Attributes

static ColumnAttributes fgDummy
 

Friends

class FairDbProxy
 

Detailed Description

Definition at line 11 of file FairDbTableMetaData.h.

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

Member Enumeration Documentation

anonymous enum
private
Enumerator:
MAXCOL 

Definition at line 51 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 51 of file FairDbTableMetaData.h

Constructor & Destructor Documentation

FairDbTableMetaData::FairDbTableMetaData ( const string &  tableName = "Unknown")
FairDbTableMetaData::~FairDbTableMetaData ( )
virtual

Definition at line 26 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 26 of file FairDbTableMetaData.cxx

Member Function Documentation

void FairDbTableMetaData::Clear ( )
protected

Definition at line 32 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 32 of file FairDbTableMetaData.cxx

References fColAttr, and fNumCols.

Referenced by SetFromSql(), and FairDbProxy::StoreMetaData().

+ Here is the caller graph for this function:

UInt_t FairDbTableMetaData::ColFieldConcept ( Int_t  colNum) const
inline

Definition at line 31 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 31 of file FairDbTableMetaData.h

References FairDbTableMetaData::ColumnAttributes::Concept, and GetAttributes().

Referenced by FairDbResultSet::RowAsCsv().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const FairDbFieldType& FairDbTableMetaData::ColFieldType ( Int_t  colNum) const
inline

Definition at line 30 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 30 of file FairDbTableMetaData.h

References GetAttributes(), and FairDbTableMetaData::ColumnAttributes::Type.

Referenced by FairDbResultSet::AsString(), FairDbRowStream::ColFieldType(), FairDbRowStream::CurColFieldType(), FairDbResultSet::RowAsCsv(), SetFromSql(), and Sql().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t FairDbTableMetaData::ColIsNullable ( Int_t  colNum) const
inline

Definition at line 32 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 32 of file FairDbTableMetaData.h

References GetAttributes(), and FairDbTableMetaData::ColumnAttributes::IsNullable.

Referenced by Sql().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t FairDbTableMetaData::ColMustDelimit ( Int_t  colNum) const
inline

Definition at line 33 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 33 of file FairDbTableMetaData.h

References GetAttributes(), and FairDbTableMetaData::ColumnAttributes::MustDelimit.

Referenced by FairDbResultSet::RowAsCsv().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbTableMetaData::ColName ( Int_t  colNum) const
inline

Definition at line 34 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 34 of file FairDbTableMetaData.h

References GetAttributes(), and FairDbTableMetaData::ColumnAttributes::Name.

Referenced by FairDbResultSet::AsString(), FairDbRowStream::ColName(), FairDbRowStream::CurColName(), HasRowCounter(), SetFromSql(), and Sql().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbTableMetaData::ExpandTo ( UInt_t  colNum)
private

Definition at line 41 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 41 of file FairDbTableMetaData.cxx

References fColAttr, fNumCols, and MAXCOL.

Referenced by SetAttributes().

+ Here is the caller graph for this function:

const FairDbTableMetaData::ColumnAttributes & FairDbTableMetaData::GetAttributes ( Int_t  colNum) const
private

Definition at line 52 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 52 of file FairDbTableMetaData.cxx

References fColAttr, fgDummy, fNumCols, and FairDbTableMetaData::ColumnAttributes::SetDefault().

Referenced by ColFieldConcept(), ColFieldType(), ColIsNullable(), ColMustDelimit(), ColName(), and SetAttributes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbTableMetaData::GetToken ( const char *&  strPtr)
staticprivate

Definition at line 62 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 62 of file FairDbTableMetaData.cxx

Referenced by SetFromSql().

+ Here is the caller graph for this function:

Bool_t FairDbTableMetaData::HasRowCounter ( ) const
inline

Definition at line 25 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 25 of file FairDbTableMetaData.h

References ColName(), and NumCols().

Referenced by FairDbTableProxyRegistry::HasRowCounter(), FairDbProxy::QuerySeqNo(), FairDbProxy::QuerySeqNos(), and FairDbSqlValPacket::Store().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t FairDbTableMetaData::NumCols ( ) const
inline

Definition at line 26 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 26 of file FairDbTableMetaData.h

References fNumCols.

Referenced by HasRowCounter(), FairDbRowStream::NumCols(), and Sql().

+ Here is the caller graph for this function:

FairDbTableMetaData::ColumnAttributes & FairDbTableMetaData::SetAttributes ( Int_t  colNum)
private

Definition at line 80 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 80 of file FairDbTableMetaData.cxx

References ExpandTo(), and GetAttributes().

Referenced by SetColFieldType(), SetColIsNullable(), and SetColName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbTableMetaData::SetColFieldType ( const FairDbFieldType type,
Int_t  colNum 
)
protected

Definition at line 91 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 91 of file FairDbTableMetaData.cxx

References FairDbTableMetaData::ColumnAttributes::Concept, FairDbFieldType::GetConcept(), FairDb::kChar, FairDb::kDate, FairDb::kString, FairDbTableMetaData::ColumnAttributes::MustDelimit, SetAttributes(), and FairDbTableMetaData::ColumnAttributes::Type.

Referenced by SetFromSql(), and FairDbProxy::StoreMetaData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbTableMetaData::SetColIsNullable ( Int_t  colNum,
Bool_t  isNullable = true 
)
inlineprotected

Definition at line 42 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 42 of file FairDbTableMetaData.h

References FairDbTableMetaData::ColumnAttributes::IsNullable, and SetAttributes().

Referenced by SetFromSql(), and FairDbProxy::StoreMetaData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbTableMetaData::SetColName ( const string &  name,
Int_t  colNum 
)
inlineprotected

Definition at line 43 of file FairDbTableMetaData.h.

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

References name, FairDbTableMetaData::ColumnAttributes::Name, and SetAttributes().

Referenced by SetFromSql(), and FairDbProxy::StoreMetaData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbTableMetaData::SetFromSql ( const string &  sql)

Definition at line 102 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 102 of file FairDbTableMetaData.cxx

References FairDbFieldType::AsString(), Clear(), ColFieldType(), ColName(), fTableName, GetToken(), name, precision, SetColFieldType(), SetColIsNullable(), and SetColName().

Referenced by FairDbStatement::TranslateSQL().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbTableMetaData::Sql ( FairDb::DbTypes  dbType = FairDb::kMySQL) const

Definition at line 186 of file FairDbTableMetaData.cxx.

View newest version in sPHENIX GitHub at line 186 of file FairDbTableMetaData.cxx

References FairDbFieldType::AsSQLString(), ColFieldType(), ColIsNullable(), ColName(), fTableName, FairDbString::GetString(), FairDb::kMySQL, FairDb::kOracle, and NumCols().

Referenced by FairDbSqlValPacket::SetMetaData(), and FairDbStatement::TranslateSQL().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbTableMetaData::TableName ( ) const
inline

Definition at line 24 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 24 of file FairDbTableMetaData.h

References fTableName.

Referenced by FairDbProxy::StoreMetaData(), FairDbRowStream::TableName(), and FairDbRowStream::TableNameTc().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class FairDbProxy
friend

Definition at line 14 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 14 of file FairDbTableMetaData.h

Member Data Documentation

std::vector<ColumnAttributes> FairDbTableMetaData::fColAttr
private

Definition at line 77 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 77 of file FairDbTableMetaData.h

Referenced by Clear(), ExpandTo(), and GetAttributes().

ColumnAttributes FairDbTableMetaData::fgDummy
staticprivate

Definition at line 73 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 73 of file FairDbTableMetaData.h

Referenced by GetAttributes().

UInt_t FairDbTableMetaData::fNumCols
private

Definition at line 78 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 78 of file FairDbTableMetaData.h

Referenced by Clear(), ExpandTo(), GetAttributes(), and NumCols().

string FairDbTableMetaData::fTableName
private

Definition at line 79 of file FairDbTableMetaData.h.

View newest version in sPHENIX GitHub at line 79 of file FairDbTableMetaData.h

Referenced by SetFromSql(), Sql(), and TableName().


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