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