Logo ROOT   6.10/09
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 
17 class TList;
18 class TSQLColumnInfo;
19 
20 class TSQLTableInfo : public TNamed {
21 
22 protected:
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 
28 public:
29  TSQLTableInfo();
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
TString fUpdateTime
table creation time
Definition: TSQLTableInfo.h:26
const char Option_t
Definition: RtypesCore.h:62
TString fCreateTime
SQL tables engine name.
Definition: TSQLTableInfo.h:25
Basic string class.
Definition: TString.h:129
virtual void Print(Option_t *option="") const
Prints table and table columns info.
TList * fColumns
Definition: TSQLTableInfo.h:23
TList * GetColumns() const
Definition: TSQLTableInfo.h:40
const char * GetUpdateTime() const
Definition: TSQLTableInfo.h:46
#define ClassDef(name, id)
Definition: Rtypes.h:297
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
A doubly linked list.
Definition: TList.h:43
virtual ~TSQLTableInfo()
destructor
const char * GetCreateTime() const
Definition: TSQLTableInfo.h:45
TSQLColumnInfo * FindColumn(const char *columnname)
Return column info object of given name.
const char * GetEngine() const
Definition: TSQLTableInfo.h:44
TSQLTableInfo()
table update time
TString fEngine
list of TSQLColumnInfo objects, describing each table column
Definition: TSQLTableInfo.h:24
const char * Data() const
Definition: TString.h:347