32 const char *pass,
const char *table)
95 if (!values || (values && values->
GetSize() < 1))
102 while (ops.
Tokenize(op, from,
",")) {
110 table.Remove(idot+1);
131 while ((o = nxi())) {
132 if (!strncmp(o->
ClassName(),
"TNamed", 6)) {
135 }
else if (!strcmp(o->
ClassName(),
"TParameter<Long64_t>")) {
138 }
else if (!strcmp(o->
ClassName(),
"TParameter<double>")) {
141 }
else if (!strcmp(o->
ClassName(),
"TParameter<float>")) {
144 }
else if (!strcmp(o->
ClassName(),
"TParameter<int>")) {
147 }
else if (!strcmp(o->
ClassName(),
"TParameter<long>")) {
162 Error(
"SendParameters",
"insert into %s failed", table.Data());
163 if (sql.
Length() > 1024) {
178 Error(
"SendParameters",
"bulk insert: first entry in list is not 'TObjString' but '%s'", o->
ClassName() );
184 if (
fVerbose)
Info(
"SendParameters",
"sending: '%s' (bulk of %d nplets)", head.Data(), values->
GetSize() - 1);
186 while ((o = nxi())) {
187 if ((os = dynamic_cast<TObjString *>(o))) {
191 Warning(
"SendParameters",
"bulk insert: ignoring not 'TObjString' entry ('%s')", o->
ClassName() );
196 Error(
"SendParameters",
"bulk insert into %s failed", table.Data());
197 if (sql.
Length() > 1024) {
211 if (sql.
Length() > head.Length()) {
213 Error(
"SendParameters",
"bulk insert into %s failed", table.Data());
214 if (sql.
Length() > 1024) {
virtual const char * GetName() const
Returns name of object.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
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.
Collectable string class.
virtual TSQLResult * Query(const char *sql)=0
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t SendParameters(TList *values, const char *)
Register query log using the information in the list which is in the form TParameter(<par>,<value>) or TNamed(<name>,<string>).
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
The TNamed class is the base class for all named ROOT classes.
TSQLMonitoringWriter(const TSQLMonitoringWriter &)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * GetName() const
Returns name of object.
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual ~TSQLMonitoringWriter()
Destructor.
TString & Remove(Ssiz_t pos)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Mother of all ROOT objects.
Int_t Atoi() const
Return integer value of string.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
virtual Int_t GetSize() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const