Logo ROOT   6.08/07
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 #ifndef ROOT_TNamed
16 #include "TNamed.h"
17 #endif
18 
19 class TList;
20 class TSQLColumnInfo;
21 
22 class TSQLTableInfo : public TNamed {
23 
24 protected:
25  TList* fColumns; //! list of TSQLColumnInfo objects, describing each table column
26  TString fEngine; //! SQL tables engine name
27  TString fCreateTime; //! table creation time
28  TString fUpdateTime; //! table update time
29 
30 public:
31  TSQLTableInfo();
32  TSQLTableInfo(const char* tablename,
33  TList* columns,
34  const char* comment = "SQL table",
35  const char* engine = 0,
36  const char* create_time = 0,
37  const char* update_time = 0);
38  virtual ~TSQLTableInfo();
39 
40  virtual void Print(Option_t* option = "") const;
41 
42  TList* GetColumns() const { return fColumns; }
43 
44  TSQLColumnInfo* FindColumn(const char* columnname);
45 
46  const char* GetEngine() const { return fEngine.Data(); }
47  const char* GetCreateTime() const { return fCreateTime.Data(); }
48  const char* GetUpdateTime() const { return fUpdateTime.Data(); }
49 
50  ClassDef(TSQLTableInfo, 0) // Summury information about SQL table
51 };
52 
53 #endif
TString fUpdateTime
table creation time
Definition: TSQLTableInfo.h:28
const char Option_t
Definition: RtypesCore.h:62
static const std::string comment("comment")
TString fCreateTime
SQL tables engine name.
Definition: TSQLTableInfo.h:27
Basic string class.
Definition: TString.h:137
virtual void Print(Option_t *option="") const
Prints table and table columns info.
TList * fColumns
Definition: TSQLTableInfo.h:25
TList * GetColumns() const
Definition: TSQLTableInfo.h:42
const char * GetUpdateTime() const
Definition: TSQLTableInfo.h:48
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
A doubly linked list.
Definition: TList.h:47
virtual ~TSQLTableInfo()
destructor
const char * GetCreateTime() const
Definition: TSQLTableInfo.h:47
TSQLColumnInfo * FindColumn(const char *columnname)
Return column info object of given name.
const char * GetEngine() const
Definition: TSQLTableInfo.h:46
TSQLTableInfo()
table update time
TString fEngine
list of TSQLColumnInfo objects, describing each table column
Definition: TSQLTableInfo.h:26
const char * Data() const
Definition: TString.h:349