12 #ifndef ROOT_TSQLServer 13 #define ROOT_TSQLServer 57 : fType(), fHost(), fDB(), fPort(-1), fErrorCode(0),
61 void SetError(
Int_t code,
const char* msg,
const char* method = 0);
virtual Bool_t Exec(const char *sql)
Execute sql query.
virtual Bool_t PingVerify()
static TSQLServer * Connect(const char *db, const char *uid, const char *pw)
The db should be of the form: <dbms>://<host>[:<port>][/<database>], e.g.
virtual TSQLResult * GetDataBases(const char *wild=0)=0
virtual TSQLResult * Query(const char *sql)=0
virtual Bool_t StartTransaction()
submit "START TRANSACTION" query to database return kTRUE, if successful
virtual Int_t CreateDataBase(const char *dbname)=0
static const char * fgFloatFmt
virtual TSQLStatement * Statement(const char *, Int_t=100)
static const char * GetFloatFormat()
return current printf format for float/double members, default "%e"
virtual Int_t DropDataBase(const char *dbname)=0
ESQLDataTypes
printf argument for floats and doubles, either "%f" or "%e" or "%10f" and so on
virtual Bool_t IsError() const
virtual Int_t GetErrorCode() const
returns error code of last operation if res==0, no error Each specific implementation of TSQLServer p...
#define ClassDef(name, id)
const char * GetDBMS() const
void ClearError()
reset error fields
virtual Bool_t Rollback()
submit "ROLLBACK" query to database return kTRUE, if successful
virtual Int_t SelectDataBase(const char *dbname)=0
virtual TSQLResult * GetColumns(const char *dbname, const char *table, const char *wild=0)=0
virtual const char * GetErrorMsg() const
returns error message of last operation if no errors, return 0 Each specific implementation of TSQLSe...
const char * GetDB() const
virtual const char * ServerInfo()=0
virtual Int_t GetMaxIdentifierLength()
static void SetFloatFormat(const char *fmt="%e")
set printf format for float/double members, default "%e"
virtual Bool_t Commit()
submit "COMMIT" query to database return kTRUE, if successful
virtual Int_t Shutdown()=0
const char * GetHost() const
virtual TSQLResult * GetTables(const char *dbname, const char *wild=0)=0
virtual void EnableErrorOutput(Bool_t on=kTRUE)
virtual TSQLTableInfo * GetTableInfo(const char *tablename)
Producec TSQLTableInfo object, which contain info about table itself and each table column Object mus...
void SetError(Int_t code, const char *msg, const char *method=0)
set new values for error fields if method is specified, displays error message
Mother of all ROOT objects.
virtual Bool_t IsConnected() const
virtual TList * GetTablesList(const char *wild=0)
Return list of user tables Parameter wild specifies wildcard for table names.
virtual void Close(Option_t *option="")=0
virtual Bool_t HasStatement() const
virtual Bool_t HasTable(const char *tablename)
Tests if table of that name exists in database Return kTRUE, if table exists.
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
const char * Data() const