TMySQLServer(const char *db, const char *uid, const char *pw)
Open a connection to a MySQL DB server. The db arguments should be
of the form "mysql://<host>[:<port>][/<database>]", e.g.:
"mysql://pcroot.cern.ch:3456/test". The uid is the username and pw
the password that should be used for the connection.
In addition, several parameters can be specified in url after "?" symbold:
timeout=N n is connect timeout is seconds
socket=socketname socketname should be name of Unix socket, used for connection
multi_statements Tell the server that the client may send multiple statements in a single string (separated by ;);
multi_results Tell the server that the client can handle multiple result sets from multiple-statement executions or stored procedures.
If several parameters are specified, they should be separated by "&" symbol
Example of connection argument:
TSQLServer::Connect("mysql://host.domain/test?timeout=10&multi_statements");
TSQLResult * Query(const char *sql)
Execute SQL command. Result object must be deleted by the user.
Returns a pointer to a TSQLResult object if successful, 0 otherwise.
The result object must be deleted by the user.
Bool_t Exec(const char* sql)
Execute SQL command which does not produce any result sets
Returns kTRUE is successfull
Int_t SelectDataBase(const char *dbname)
Select a database. Returns 0 if successful, non-zero otherwise.
TSQLResult * GetDataBases(const char *wild)
List all available databases. Wild is for wildcarding "t%" list all
databases starting with "t".
Returns a pointer to a TSQLResult object if successful, 0 otherwise.
The result object must be deleted by the user.
TSQLResult * GetTables(const char *dbname, const char *wild)
List all tables in the specified database. Wild is for wildcarding
"t%" list all tables starting with "t".
Returns a pointer to a TSQLResult object if successful, 0 otherwise.
The result object must be deleted by the user.
TSQLResult * GetColumns(const char *dbname, const char *table, const char *wild)
List all columns in specified table in the specified database.
Wild is for wildcarding "t%" list all columns starting with "t".
Returns a pointer to a TSQLResult object if successful, 0 otherwise.
The result object must be deleted by the user.
Int_t CreateDataBase(const char *dbname)
Create a database. Returns 0 if successful, non-zero otherwise.
Int_t DropDataBase(const char *dbname)
Drop (i.e. delete) a database. Returns 0 if successful, non-zero
otherwise.
Int_t Reload()
Reload permission tables. Returns 0 if successful, non-zero
otherwise. User must have reload permissions.
Int_t Shutdown()
Shutdown the database server. Returns 0 if successful, non-zero
otherwise. User must have shutdown permissions.
TMySQLServer(const char *db, const char *uid, const char *pw)
Author: Fons Rademakers 15/02/2000
Last update: root/mysql:$Name: $:$Id: TMySQLServer.cxx,v 1.15 2006/07/10 11:05:50 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - 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.