HDbTable


class description - source file - inheritance tree

class HDbTable : public TNamed

    private:
void setNames(const char*) public:
HDbTable HDbTable() HDbTable HDbTable(HDbConn* p, HDbFileUtil*, const char*) HDbTable HDbTable(HDbConn* p, HDbFileUtil*, HDbTable&) HDbTable HDbTable(HDbTable&) virtual void ~HDbTable() HDbColumn* addColumn(const char*, const char* columnType = 0) void addColumn(HDbColumn*) static TClass* Class() void clearColumns() void clearCondition() void clearOrderBy() Bool_t createTable() Bool_t describeTable() Bool_t dropTable() const char* getColDefaultType() const HDbColumn* getColumn(Int_t) HDbColumn* getColumn(const char*) const char* getCondition() const Int_t getNColumns() const char* getOrderBy() const virtual TClass* IsA() const Bool_t isExisting() Bool_t isTempTable() void removeColumn(const char*) void setColDefaultType(TString& s) void setColumns(const char*, const char* colTypes = 0) void setCondition(const char* s) void setOrderBy(const char* s) void show() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) Int_t writeTable(ostream&, const char*, const char*, const char*) Int_t writeTableWithCursor(ostream&, const char*, const char*, const char*)

Data Members

private:
HDbConn* dbConn Pointer to the connection class HDbFileUtil* dbUtil Pointer to the utility class TString tabName Name of the table TString tabOwner Owner of the table TList* tabColumns List of columns Int_t nColumns Number of columns Bool_t tempTable Flag (kTRUE for a table created inside the program) Bool_t existing Flag (kTRUE for an existing table) TString colDefaultType Default type for columns TString cond Condition for a select statement TString orderClause Order clause for a select statement

Class Description

 HDbColumnTable

 Class for an Oracle table



HDbTable()
 Default constructor

HDbTable(HDbConn* p, HDbFileUtil* u, const char* tName)
 Constructor
 Parameters: pointer to the Oracle connection class, the Oracle utility class
 and the name of the table

HDbTable(HDbConn* p, HDbFileUtil* u, HDbTable& t)
 Copy constructor
 Parameters: pointer to the Oracle connection class, the Oracle utility class
 and reference to an other table

~HDbTable()
 Destructor

HDbColumn* getColumn(Int_t n)
 Returns the column number n (starting with index 0)

HDbColumn* getColumn(const char* colName)
 Returns the column with the specified name

HDbColumn* addColumn(const char* colName, const char* columnType)
 Adds a column to the list. The type of the column is optional and needed
 only for the creation of a non-existing table with non default types.

void addColumn(HDbColumn* p)
 Adds a copy of the column p to the list

void removeColumn(const char* colName)
 Removes the column with this name and deletes it

void clearColumns()
 Clears the list of columns

void setColumns(const char* colNames, const char* colTypes)
 Sets a list of columns and types(optional). The lists must be comma separated.

void setCondition(const char* s)
 Sets the condition for a SELECT statement ("WHERE" is added internally!)

void setOrderBy(const char* s)
 Sets the ORDER BY clause for a SELECT statement
 Multiple columns must by separated by commas.
 ("ORDER BY" is added internally!)

Bool_t describeTable()
 Gets the table definition (columns, types, nullable) from Oracle

Bool_t createTable()
 Creates the table in Oracle (created only in the account of the connected user)

Bool_t dropTable()
 Drops the table (drops the table only if created inside the current Oracle session)

void show()
 Shows the table definition

Int_t writeTable(ostream& pout, const char* colDelim, const char* textDelim, const char* nullString)
 Writes the content of the table to a stream.
 Fetches the table in batches of 1000 rows.

void setNames(const char* tName)
 Sets the table owner and name from a concatinated string (separated by ".")



Inline Functions


              Int_t getNColumns()
               void setColDefaultType(TString& s)
        const char* getCondition() const
               void clearCondition()
        const char* getOrderBy() const
               void clearOrderBy()
        const char* getColDefaultType() const
             Bool_t isTempTable()
             Bool_t isExisting()
              Int_t writeTableWithCursor(ostream&, const char*, const char*, const char*)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
           HDbTable HDbTable(HDbTable&)


Last update: 15/09/2000


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.