Warning, file /include/root/TSQLClassInfo.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TSQLClassInfo
0013 #define ROOT_TSQLClassInfo
0014
0015 #include "TObject.h"
0016
0017 #include "TString.h"
0018
0019 class TObjArray;
0020
0021 class TSQLClassColumnInfo final : public TObject {
0022
0023 public:
0024 TSQLClassColumnInfo() {}
0025 TSQLClassColumnInfo(const char *name, const char *sqlname, const char *sqltype);
0026
0027 const char *GetName() const final { return fName.Data(); }
0028 const char *GetSQLName() const { return fSQLName.Data(); }
0029 const char *GetSQLType() const { return fSQLType.Data(); }
0030
0031 protected:
0032 TString fName;
0033 TString fSQLName;
0034 TString fSQLType;
0035
0036 ClassDefOverride(TSQLClassColumnInfo, 1);
0037 };
0038
0039
0040
0041 class TSQLClassInfo final : public TObject {
0042 public:
0043 TSQLClassInfo() {}
0044 TSQLClassInfo(Long64_t classid, const char *classname, Int_t version);
0045 ~TSQLClassInfo() override;
0046
0047 Long64_t GetClassId() const { return fClassId; }
0048
0049 const char *GetName() const final { return fClassName.Data(); }
0050 Int_t GetClassVersion() const { return fClassVersion; }
0051
0052 void SetClassTableName(const char *name) { fClassTable = name; }
0053 void SetRawTableName(const char *name) { fRawTable = name; }
0054
0055 const char *GetClassTableName() const { return fClassTable.Data(); }
0056 const char *GetRawTableName() const { return fRawTable.Data(); }
0057
0058 void SetTableStatus(TObjArray *columns = nullptr, Bool_t israwtable = kFALSE);
0059 void SetColumns(TObjArray *columns);
0060 void SetRawExist(Bool_t on) { fRawtableExist = on; }
0061
0062 Bool_t IsClassTableExist() const { return GetColumns() != nullptr; }
0063 Bool_t IsRawTableExist() const { return fRawtableExist; }
0064
0065 TObjArray *GetColumns() const { return fColumns; }
0066 Int_t FindColumn(const char *name, Bool_t sqlname = kFALSE);
0067
0068 protected:
0069 TString fClassName;
0070 Int_t fClassVersion{0};
0071 Long64_t fClassId{0};
0072 TString fClassTable;
0073 TString fRawTable;
0074 TObjArray *fColumns{nullptr};
0075 Bool_t fRawtableExist{kFALSE};
0076
0077 ClassDefOverride(TSQLClassInfo, 1);
0078 };
0079
0080 #endif