#include "TSQLTableInfo.h"
#include "TSQLColumnInfo.h"
#include "TList.h"
#include "TROOT.h"
#include "Riostream.h"
ClassImp(TSQLTableInfo)
TSQLTableInfo::TSQLTableInfo() :
TNamed(),
fColumns(0),
fEngine(),
fCreateTime(),
fUpdateTime()
{
}
TSQLTableInfo::TSQLTableInfo(const char* tablename,
TList* columns,
const char* comment,
const char* engine,
const char* create_time,
const char* update_time) :
TNamed(tablename, comment),
fColumns(columns),
fEngine(engine),
fCreateTime(create_time),
fUpdateTime(update_time)
{
}
TSQLTableInfo::~TSQLTableInfo()
{
if (fColumns!=0) {
fColumns->Delete();
delete fColumns;
fColumns = 0;
}
}
void TSQLTableInfo::Print(Option_t*) const
{
TROOT::IndentLevel();
cout << "Table:" << GetName();
if ((GetTitle()!=0) && (strlen(GetTitle())!=0))
cout << " comm:'" << GetTitle() << "'";
if (fEngine.Length()>0)
cout << " engine:" << fEngine;
if (fCreateTime.Length()>0)
cout << " create:" << fCreateTime;
if (fUpdateTime.Length()>0)
cout << " update:" << fUpdateTime;
cout << endl;
TROOT::IncreaseDirLevel();
if (fColumns!=0)
fColumns->Print("*");
TROOT::DecreaseDirLevel();
}
TSQLColumnInfo* TSQLTableInfo::FindColumn(const char* columnname)
{
if ((columnname==0) || (fColumns==0)) return 0;
return dynamic_cast<TSQLColumnInfo*> (fColumns->FindObject(columnname));
}
Last change: Wed Jun 25 08:52:42 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.