Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSQLTableInfo.h
Go to the documentation of this file.
1// @(#)root/net:$Id$
2// Author: Sergey Linev 31/05/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TSQLTableInfo
13#define ROOT_TSQLTableInfo
14
15#include "TNamed.h"
16
17class TList;
18class TSQLColumnInfo;
19
20class TSQLTableInfo : public TNamed {
21
22protected:
23 TList* fColumns; //! list of TSQLColumnInfo objects, describing each table column
24 TString fEngine; //! SQL tables engine name
25 TString fCreateTime; //! table creation time
26 TString fUpdateTime; //! table update time
27
28public:
30 TSQLTableInfo(const char* tablename,
31 TList* columns,
32 const char* comment = "SQL table",
33 const char* engine = 0,
34 const char* create_time = 0,
35 const char* update_time = 0);
36 virtual ~TSQLTableInfo();
37
38 virtual void Print(Option_t* option = "") const;
39
40 TList* GetColumns() const { return fColumns; }
41
42 TSQLColumnInfo* FindColumn(const char* columnname);
43
44 const char* GetEngine() const { return fEngine.Data(); }
45 const char* GetCreateTime() const { return fCreateTime.Data(); }
46 const char* GetUpdateTime() const { return fUpdateTime.Data(); }
47
48 ClassDef(TSQLTableInfo, 0) // Summury information about SQL table
49};
50
51#endif
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
A doubly linked list.
Definition TList.h:44
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void Print(Option_t *option="") const
Prints table and table columns info.
TSQLColumnInfo * FindColumn(const char *columnname)
Return column info object of given name.
const char * GetUpdateTime() const
TSQLTableInfo()
table update time
TString fCreateTime
SQL tables engine name.
TString fEngine
list of TSQLColumnInfo objects, describing each table column
const char * GetCreateTime() const
const char * GetEngine() const
virtual ~TSQLTableInfo()
destructor
TString fUpdateTime
table creation time
TList * GetColumns() const
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369