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 
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
TSQLTableInfo::TSQLTableInfo
TSQLTableInfo()
table update time
Definition: TSQLTableInfo.cxx:36
TSQLColumnInfo
Definition: TSQLColumnInfo.h:17
Option_t
const char Option_t
Definition: RtypesCore.h:66
TString::Data
const char * Data() const
Definition: TString.h:369
TSQLTableInfo::GetUpdateTime
const char * GetUpdateTime() const
Definition: TSQLTableInfo.h:46
TNamed.h
TSQLTableInfo::Print
virtual void Print(Option_t *option="") const
Prints table and table columns info.
Definition: TSQLTableInfo.cxx:77
TSQLTableInfo
Definition: TSQLTableInfo.h:20
TSQLTableInfo::fEngine
TString fEngine
list of TSQLColumnInfo objects, describing each table column
Definition: TSQLTableInfo.h:24
TSQLTableInfo::~TSQLTableInfo
virtual ~TSQLTableInfo()
destructor
Definition: TSQLTableInfo.cxx:65
TString
Basic string class.
Definition: TString.h:136
TSQLTableInfo::GetColumns
TList * GetColumns() const
Definition: TSQLTableInfo.h:40
TSQLTableInfo::fUpdateTime
TString fUpdateTime
table creation time
Definition: TSQLTableInfo.h:26
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TSQLTableInfo::GetEngine
const char * GetEngine() const
Definition: TSQLTableInfo.h:44
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TSQLTableInfo::fCreateTime
TString fCreateTime
SQL tables engine name.
Definition: TSQLTableInfo.h:25
TSQLTableInfo::fColumns
TList * fColumns
Definition: TSQLTableInfo.h:23
TSQLTableInfo::FindColumn
TSQLColumnInfo * FindColumn(const char *columnname)
Return column info object of given name.
Definition: TSQLTableInfo.cxx:105
ROOT::TMetaUtils::propNames::comment
static const std::string comment("comment")
TSQLTableInfo::GetCreateTime
const char * GetCreateTime() const
Definition: TSQLTableInfo.h:45
TList
A doubly linked list.
Definition: TList.h:44