Logo ROOT  
Reference Guide
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:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
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.
TList * fColumns
Definition: TSQLTableInfo.h:23
const char * GetUpdateTime() const
Definition: TSQLTableInfo.h:46
TSQLTableInfo()
table update time
TString fCreateTime
SQL tables engine name.
Definition: TSQLTableInfo.h:25
TString fEngine
list of TSQLColumnInfo objects, describing each table column
Definition: TSQLTableInfo.h:24
const char * GetCreateTime() const
Definition: TSQLTableInfo.h:45
const char * GetEngine() const
Definition: TSQLTableInfo.h:44
virtual ~TSQLTableInfo()
destructor
TString fUpdateTime
table creation time
Definition: TSQLTableInfo.h:26
TList * GetColumns() const
Definition: TSQLTableInfo.h:40
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364