34 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
45 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
57 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
112 i = atoi((*fRowPtr)->GetField(*
fIter));
122 f = atof((*fRowPtr)->GetField(*
fIter));
132 l = atol((*fRowPtr)->GetField(*
fIter));
142 d = atof((*fRowPtr)->GetField(*
fIter));
152 (*fInsertQuery) += b;
153 (*fInsertQuery) +=
",";
162 (*fInsertQuery) +=
c;
163 (*fInsertQuery) +=
",";
172 (*fInsertQuery) +=
h;
173 (*fInsertQuery) +=
",";
182 (*fInsertQuery) += i;
183 (*fInsertQuery) +=
",";
192 (*fInsertQuery) +=
l;
193 (*fInsertQuery) +=
",";
202 (*fInsertQuery) +=
f;
203 (*fInsertQuery) +=
",";
212 (*fInsertQuery) += d;
213 (*fInsertQuery) +=
",";
243 Int_t code = sscanf(val.
Data(),
"%u",&ui);
244 if(code == 0)
Error(
"operator>>(UInt_t&)",
"Error reading UInt_t");
255 Int_t code = sscanf(val.
Data(),
"%lu",&ul);
256 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading ULong_t");
267 Int_t code = sscanf(val.
Data(),
"%lld",&ll);
268 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading Long64_t");
279 Int_t code = sscanf(val.
Data(),
"%llu",&ull);
280 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading ULong64_t");
290 strcpy(str,(*fRowPtr)->GetField(*
fIter));
333 (*fInsertQuery) += uc;
334 (*fInsertQuery) +=
",";
343 (*fInsertQuery) += us;
344 (*fInsertQuery) +=
",";
353 (*fInsertQuery) += ui;
354 (*fInsertQuery) +=
",";
363 (*fInsertQuery) += ul;
364 (*fInsertQuery) +=
",";
373 (*fInsertQuery) += ll;
374 (*fInsertQuery) +=
",";
383 (*fInsertQuery) += ull;
384 (*fInsertQuery) +=
",";
393 (*fInsertQuery) +=
"\"";
394 (*fInsertQuery) += str;
395 (*fInsertQuery) +=
"\",";
404 for(
int i=0; i<
n; ++i) {
405 (*fInsertQuery) += b[i];
406 (*fInsertQuery) +=
",";
416 for(
int i=0; i<
n; ++i) {
417 (*fInsertQuery) += (
Short_t)c[i];
418 (*fInsertQuery) +=
",";
428 (*fInsertQuery) +=
"\"";
429 (*fInsertQuery) +=
c;
430 (*fInsertQuery) +=
"\",";
439 for(
int i=0; i<
n; ++i) {
440 (*fInsertQuery) += uc[i];
441 (*fInsertQuery) +=
",";
451 for(
int i=0; i<
n; ++i) {
452 (*fInsertQuery) += h[i];
453 (*fInsertQuery) +=
",";
463 for(
int i=0; i<
n; ++i) {
464 (*fInsertQuery) += us[i];
465 (*fInsertQuery) +=
",";
476 for(
int i=0; i<
n; ++i) {
477 (*fInsertQuery) += ii[i];
478 (*fInsertQuery) +=
",";
488 for(
int i=0; i<
n; ++i) {
489 (*fInsertQuery) += ui[i];
490 (*fInsertQuery) +=
",";
500 for(
int i=0; i<
n; ++i) {
501 (*fInsertQuery)+= l[i];
502 (*fInsertQuery)+=
",";
512 for(
int i=0; i<
n; ++i) {
513 (*fInsertQuery) += ul[i];
514 (*fInsertQuery) +=
",";
524 for(
int i=0; i<
n; ++i) {
525 (*fInsertQuery) += l[i];
526 (*fInsertQuery) +=
",";
536 for(
int i=0; i<
n; ++i) {
537 (*fInsertQuery) += ul[i];
538 (*fInsertQuery) +=
",";
548 for(
int i=0; i<
n; ++i) {
549 (*fInsertQuery) += f[i];
550 (*fInsertQuery) +=
",";
560 for(
int i=0; i<
n; ++i) {
561 (*fInsertQuery) += d[i];
562 (*fInsertQuery )+=
",";
572 Fatal(
"riteFastArray(void*, const TClass*, Int_t, TMemberStreamer *)",
"Not implemented yet");
580 Fatal(
"WriteFastArray(void **, const TClass*, Int_t, Bool_t, TMemberStreamer*)",
"Not implemented yet");
589 for(
int i=0; i<
n; ++i) {
600 for(
int i=0; i<
n; ++i) {
611 strcpy(c,((*fRowPtr)->GetField(*
fIter)));
620 for(
int i=0; i<
n; ++i) {
631 for(
int i=0; i<
n; ++i) {
642 for(
int i=0; i<
n; ++i) {
653 for(
int i=0; i<
n; ++i) {
654 in[i] = atoi((*fRowPtr)->GetField(*
fIter));
664 for(
int i=0; i<
n; ++i) {
665 ui[i] = atoi((*fRowPtr)->GetField(*
fIter));
675 for(
int i=0; i<
n; ++i) {
676 l[i] = atol((*fRowPtr)->GetField(*
fIter));
686 for(
int i=0; i<
n; ++i) {
696 for(
int i=0; i<
n; ++i) {
706 for(
int i=0; i<
n; ++i) {
716 for(
int i=0; i<
n; ++i) {
717 f[i] = atof((*fRowPtr)->GetField(*
fIter));
727 for(
int i=0; i<
n; ++i) {
728 d[i] = atof((*fRowPtr)->GetField(*
fIter));
738 Fatal(
"ReadFastArrayFloat16(Float_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
746 Fatal(
"ReadFastArrayWithFactor(Float_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
754 Fatal(
"ReadFastArrayWithNbits(Float_t *, Int_t , Int_t )",
"Not implemented yet");
762 Fatal(
"ReadFastArrayWithFactor(Double_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
770 Fatal(
"ReadFastArrayWithNbits(Double_t *, Int_t , Int_t )",
"Not implemented yet");
778 Fatal(
"ReadFastArrayDouble32(Double_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
786 Fatal(
"ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
794 Fatal(
"ReadFastArray(void **, const TClass *, Int_t, Bool_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
808 void TBufferSQL::insert_test(
const char* dsn,
const char* usr,
809 const char* pwd,
const TString& tblname)
812 TString select =
"select * from ";
815 sql = select +
"ins";
817 con = gSQLDriverManager->GetConnection(dsn,usr,pwd);
820 printf(
"\n\n\nConnection NOT Successful\n\n\n");
822 printf(
"\n\n\nConnection Sucessful\n\n\n");
824 stmt = con->CreateStatement(0, odbc::ResultSet::CONCUR_READ_ONLY);
826 ptr = stmt->ExecuteQuery(sql.
Data());
827 if(!ptr)
printf(
"No recorSet found!");
830 ptr->MoveToInsertRow();
831 std::cerr <<
"IsAfterLast(): " << ptr->IsAfterLast() << std::endl;
832 ptr->UpdateInt(1, 5555);
836 ptr1 = stmt->ExecuteQuery(sql.
Data());
virtual void ReadLong64(Long64_t &l)
Operator>>
virtual void WriteUShort(UShort_t s)
Operator<<.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
virtual void WriteUChar(UChar_t c)
Operator<<.
Implement TBuffer for a SQL backend.
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual void WriteChar(Char_t c)
Operator<<.
virtual void ReadStdString(std::string &s)
Read a std::string.
virtual void WriteCharP(const Char_t *c)
Operator<<.
void ResetOffset()
Reset Offset.
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of Float16_t from buffer.
virtual void WriteShort(Short_t s)
Operator<<.
virtual void ReadUChar(UChar_t &c)
Operator>>
std::vector< Int_t >::const_iterator fIter
const char * Data() const
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ReadLong(Long_t &l)
Operator>>
virtual void ReadChar(Char_t &c)
Operator>>
virtual void ReadCharP(Char_t *c)
Operator>>
virtual void ReadInt(Int_t &i)
Operator>>
virtual void ReadUShort(UShort_t &s)
Operator>>
virtual void ReadFloat(Float_t &f)
Operator>>
virtual void WriteStdString(const std::string &s)
Write a std::string.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
WriteFastArray SQL implementation.
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
WriteFastArray SQL implementation.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void ReadTString(TString &s)
Read a TString.
virtual void WriteTString(const TString &s)
Write TString to TBuffer.
virtual void WriteFloat(Float_t f)
Operator<<.
virtual void ReadStdString(std::string &s)
Read std::string from TBuffer.
virtual void ReadShort(Short_t &s)
Operator>>
virtual void WriteInt(Int_t i)
Operator<<.
virtual void WriteLong(Long_t l)
Operator<<.
std::vector< Int_t > * fColumnVec
virtual void WriteLong64(Long64_t l)
Operator<<.
The ROOT global object gROOT contains a list of all defined classes.
virtual void ReadFastArray(Bool_t *, Int_t)
ReadFastArray SQL implementation.
virtual void ReadULong(ULong_t &l)
Operator>>
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
virtual void WriteBool(Bool_t b)
Operator<<.
virtual void ReadUInt(UInt_t &i)
Operator>>
unsigned long long ULong64_t
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void ReadFastArrayString(Char_t *, Int_t)
ReadFastArray SQL implementation.
virtual void WriteUInt(UInt_t i)
Operator<<.
virtual void WriteULong(ULong_t l)
Operator<<.
virtual void ReadDouble(Double_t &d)
Operator>>
virtual void WriteDouble(Double_t d)
Operator<<.
virtual void WriteStdString(const std::string &s)
Write std::string to TBuffer.
virtual void WriteULong64(ULong64_t l)
Operator<<.
virtual void WriteTString(const TString &s)
Write a TString.
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of Float16_t from buffer.
virtual void ReadBool(Bool_t &b)
Operator>>
virtual void ReadULong64(ULong64_t &l)
Operator>>
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.