35 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
113 i = atoi((*fRowPtr)->GetField(*
fIter));
123 f = atof((*fRowPtr)->GetField(*
fIter));
133 l = atol((*fRowPtr)->GetField(*
fIter));
143 d = atof((*fRowPtr)->GetField(*
fIter));
153 (*fInsertQuery) +=
b;
154 (*fInsertQuery) +=
",";
163 (*fInsertQuery) +=
c;
164 (*fInsertQuery) +=
",";
173 (*fInsertQuery) +=
h;
174 (*fInsertQuery) +=
",";
183 (*fInsertQuery) += i;
184 (*fInsertQuery) +=
",";
193 (*fInsertQuery) +=
l;
194 (*fInsertQuery) +=
",";
203 (*fInsertQuery) +=
f;
204 (*fInsertQuery) +=
",";
213 (*fInsertQuery) += d;
214 (*fInsertQuery) +=
",";
244 Int_t code = sscanf(val.
Data(),
"%u",&ui);
245 if(code == 0)
Error(
"operator>>(UInt_t&)",
"Error reading UInt_t");
256 Int_t code = sscanf(val.
Data(),
"%lu",&ul);
257 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading ULong_t");
268 Int_t code = sscanf(val.
Data(),
"%lld",&ll);
269 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading Long64_t");
280 Int_t code = sscanf(val.
Data(),
"%llu",&ull);
281 if(code == 0)
Error(
"operator>>(ULong_t&)",
"Error reading ULong64_t");
291 strcpy(str,(*fRowPtr)->GetField(*
fIter));
334 (*fInsertQuery) += uc;
335 (*fInsertQuery) +=
",";
344 (*fInsertQuery) += us;
345 (*fInsertQuery) +=
",";
354 (*fInsertQuery) += ui;
355 (*fInsertQuery) +=
",";
364 (*fInsertQuery) += ul;
365 (*fInsertQuery) +=
",";
374 (*fInsertQuery) += ll;
375 (*fInsertQuery) +=
",";
384 (*fInsertQuery) += ull;
385 (*fInsertQuery) +=
",";
394 (*fInsertQuery) +=
"\"";
395 (*fInsertQuery) += str;
396 (*fInsertQuery) +=
"\",";
405 for(
int i=0; i<
n; ++i) {
406 (*fInsertQuery) += b[i];
407 (*fInsertQuery) +=
",";
417 for(
int i=0; i<
n; ++i) {
418 (*fInsertQuery) += (
Short_t)c[i];
419 (*fInsertQuery) +=
",";
429 (*fInsertQuery) +=
"\"";
430 (*fInsertQuery) +=
c;
431 (*fInsertQuery) +=
"\",";
440 for(
int i=0; i<
n; ++i) {
441 (*fInsertQuery) += uc[i];
442 (*fInsertQuery) +=
",";
452 for(
int i=0; i<
n; ++i) {
453 (*fInsertQuery) += h[i];
454 (*fInsertQuery) +=
",";
464 for(
int i=0; i<
n; ++i) {
465 (*fInsertQuery) += us[i];
466 (*fInsertQuery) +=
",";
477 for(
int i=0; i<
n; ++i) {
478 (*fInsertQuery) += ii[i];
479 (*fInsertQuery) +=
",";
489 for(
int i=0; i<
n; ++i) {
490 (*fInsertQuery) += ui[i];
491 (*fInsertQuery) +=
",";
501 for(
int i=0; i<
n; ++i) {
502 (*fInsertQuery)+= l[i];
503 (*fInsertQuery)+=
",";
513 for(
int i=0; i<
n; ++i) {
514 (*fInsertQuery) += ul[i];
515 (*fInsertQuery) +=
",";
525 for(
int i=0; i<
n; ++i) {
526 (*fInsertQuery) += l[i];
527 (*fInsertQuery) +=
",";
537 for(
int i=0; i<
n; ++i) {
538 (*fInsertQuery) += ul[i];
539 (*fInsertQuery) +=
",";
549 for(
int i=0; i<
n; ++i) {
550 (*fInsertQuery) += f[i];
551 (*fInsertQuery) +=
",";
561 for(
int i=0; i<
n; ++i) {
562 (*fInsertQuery) += d[i];
563 (*fInsertQuery )+=
",";
573 Fatal(
"riteFastArray(void*, const TClass*, Int_t, TMemberStreamer *)",
"Not implemented yet");
581 Fatal(
"WriteFastArray(void **, const TClass*, Int_t, Bool_t, TMemberStreamer*)",
"Not implemented yet");
590 for(
int i=0; i<
n; ++i) {
601 for(
int i=0; i<
n; ++i) {
612 strcpy(c,((*fRowPtr)->GetField(*
fIter)));
621 for(
int i=0; i<
n; ++i) {
632 for(
int i=0; i<
n; ++i) {
643 for(
int i=0; i<
n; ++i) {
654 for(
int i=0; i<
n; ++i) {
655 in[i] = atoi((*fRowPtr)->GetField(*
fIter));
665 for(
int i=0; i<
n; ++i) {
666 ui[i] = atoi((*fRowPtr)->GetField(*
fIter));
676 for(
int i=0; i<
n; ++i) {
677 l[i] = atol((*fRowPtr)->GetField(*
fIter));
687 for(
int i=0; i<
n; ++i) {
697 for(
int i=0; i<
n; ++i) {
707 for(
int i=0; i<
n; ++i) {
717 for(
int i=0; i<
n; ++i) {
718 f[i] = atof((*fRowPtr)->GetField(*
fIter));
728 for(
int i=0; i<
n; ++i) {
729 d[i] = atof((*fRowPtr)->GetField(*
fIter));
739 Fatal(
"ReadFastArrayFloat16(Float_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
747 Fatal(
"ReadFastArrayWithFactor(Float_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
755 Fatal(
"ReadFastArrayWithNbits(Float_t *, Int_t , Int_t )",
"Not implemented yet");
763 Fatal(
"ReadFastArrayWithFactor(Double_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
771 Fatal(
"ReadFastArrayWithNbits(Double_t *, Int_t , Int_t )",
"Not implemented yet");
779 Fatal(
"ReadFastArrayDouble32(Double_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
787 Fatal(
"ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
795 Fatal(
"ReadFastArray(void **, const TClass *, Int_t, Bool_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
809 void TBufferSQL::insert_test(
const char* dsn,
const char* usr,
810 const char* pwd,
const TString& tblname)
813 TString select =
"select * from ";
816 sql = select +
"ins";
818 con = gSQLDriverManager->GetConnection(dsn,usr,pwd);
821 printf(
"\n\n\nConnection NOT Successful\n\n\n");
823 printf(
"\n\n\nConnection Sucessful\n\n\n");
825 stmt = con->CreateStatement(0, odbc::ResultSet::CONCUR_READ_ONLY);
827 ptr = stmt->ExecuteQuery(sql.
Data());
828 if(!ptr) printf(
"No recorSet found!");
831 ptr->MoveToInsertRow();
832 std::cerr <<
"IsAfterLast(): " << ptr->IsAfterLast() << std::endl;
833 ptr->UpdateInt(1, 5555);
837 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
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<<.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
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.