Ignore:
Timestamp:
04/24/13 19:11:15 (11 years ago)
Author:
tbretz
Message:
Removed support for writing to the table; added support for left joins
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msql/MTreeSQL.h

    r15417 r15419  
    3939class TSQLServer;
    4040class TSQLRow;
    41 class MBasketSQL;
    4241
    4342class MTreeSQL : public TTree {
     
    4645   Int_t                  fCurrentEntry;
    4746   TString                fDB;
    48    TString                fInsertQuery;   
    4947   TString                fQuery;
    50    TString                fTable;
    5148   TSQLResult            *fResult;
    5249   TSQLRow               *fRow;
    5350   TSQLServer            *fServer;
    54    Bool_t                 fBranchChecked;
     51   std::vector<TString>   fTables;
    5552
    56    void                   CheckBasket(TBranch * tb);
    57    Bool_t                 CheckBranch(TBranch * tb);
    5853   Bool_t                 CheckTable(const TString &table) const;
    59    TString                CreateBranches(TSQLResult * rs);
     54   TString                CreateBranches(TSQLResult * rs, const TString &table);
    6055   std::vector<Int_t>    *GetColumnIndice(TBranch *branch);
    61    void                   Init();   
    62    void                   ResetQuery();
    63    TString                ConvertTypeName(const TString& typeName );
    64    virtual void           CreateBranch(const TString& branchName,const TString &typeName);
    65    Bool_t                 CreateTable(const TString& table);
    66    virtual TBasket       *CreateBasket(TBranch * br);
     56   void                   Init();
     57   virtual TBasket       *CreateBasket(TBranch * br);
    6758
    6859   virtual TBranch *BranchImp(const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel);
    6960   virtual TBranch *BranchImp(const char *branchname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel);
    70    
     61
    7162public:
    72    MTreeSQL(TSQLServer * server, TString DB, const TString& table, const TString &addon);
     63   MTreeSQL(TSQLServer * server, TString DB, const TString& table, const TString &addon="");
    7364
    7465   virtual Int_t          Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="");
     
    8879   virtual Long64_t       GetEntries(const char *sel) { return TTree::GetEntries(sel); }
    8980   virtual Long64_t       GetEntriesFast()const;
    90            TString        GetTableName(){ return fTable; }
    9181   virtual Long64_t       LoadTree(Long64_t entry);
    9282   virtual Long64_t       PrepEntry(Long64_t entry);
Note: See TracChangeset for help on using the changeset viewer.