#include "TSQLClassInfo.h"
#include "TObjArray.h"
ClassImp(TSQLClassColumnInfo)
TSQLClassColumnInfo::TSQLClassColumnInfo() :
TObject(),
fName(),
fSQLName(),
fSQLType()
{
}
TSQLClassColumnInfo::TSQLClassColumnInfo(const char* name,
const char* sqlname,
const char* sqltype) :
TObject(),
fName(name),
fSQLName(sqlname),
fSQLType(sqltype)
{
}
TSQLClassColumnInfo::~TSQLClassColumnInfo()
{
}
ClassImp(TSQLClassInfo)
TSQLClassInfo::TSQLClassInfo() :
TObject(),
fClassName(),
fClassVersion(0),
fClassId(0),
fClassTable(),
fRawTable(),
fColumns(0),
fRawtableExist(kFALSE)
{
}
TSQLClassInfo::TSQLClassInfo(Long64_t classid,
const char* classname,
Int_t version) :
TObject(),
fClassName(classname),
fClassVersion(version),
fClassId(classid),
fClassTable(),
fRawTable(),
fColumns(0),
fRawtableExist(kFALSE)
{
fClassTable.Form("%s_ver%d", classname, version);
fRawTable.Form("%s_raw%d", classname, version);
}
TSQLClassInfo::~TSQLClassInfo()
{
if (fColumns!=0) {
fColumns->Delete();
delete fColumns;
}
}
void TSQLClassInfo::SetColumns(TObjArray* columns)
{
if (fColumns!=0) {
fColumns->Delete();
delete fColumns;
}
fColumns = columns;
}
void TSQLClassInfo::SetTableStatus(TObjArray* columns, Bool_t israwtable)
{
SetColumns(columns);
fRawtableExist = israwtable;
}
Int_t TSQLClassInfo::FindColumn(const char* name, Bool_t sqlname)
{
if ((name==0) || (fColumns==0)) return -1;
TIter next(fColumns);
TSQLClassColumnInfo* col = 0;
Int_t indx = 0;
while ((col = (TSQLClassColumnInfo*) next()) != 0) {
const char* colname = sqlname ? col->GetSQLName() : col->GetName();
if (strcmp(colname, name)==0) return indx;
indx++;
}
return -1;
}
Last change: Wed Jun 25 08:52:33 2008
Last generated: 2008-06-25 08:52
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.