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));
351 (*fInsertQuery) += uc;
352 (*fInsertQuery) +=
",";
361 (*fInsertQuery) +=
us;
362 (*fInsertQuery) +=
",";
371 (*fInsertQuery) += ui;
372 (*fInsertQuery) +=
",";
381 (*fInsertQuery) += ul;
382 (*fInsertQuery) +=
",";
391 (*fInsertQuery) += ll;
392 (*fInsertQuery) +=
",";
401 (*fInsertQuery) += ull;
402 (*fInsertQuery) +=
",";
411 (*fInsertQuery) +=
"\"";
412 (*fInsertQuery) += str;
413 (*fInsertQuery) +=
"\",";
422 for(
int i=0; i<
n; ++i) {
423 (*fInsertQuery) += b[i];
424 (*fInsertQuery) +=
",";
434 for(
int i=0; i<
n; ++i) {
435 (*fInsertQuery) += (
Short_t)c[i];
436 (*fInsertQuery) +=
",";
446 (*fInsertQuery) +=
"\"";
447 (*fInsertQuery) +=
c;
448 (*fInsertQuery) +=
"\",";
457 for(
int i=0; i<
n; ++i) {
458 (*fInsertQuery) += uc[i];
459 (*fInsertQuery) +=
",";
469 for(
int i=0; i<
n; ++i) {
470 (*fInsertQuery) += h[i];
471 (*fInsertQuery) +=
",";
481 for(
int i=0; i<
n; ++i) {
482 (*fInsertQuery) += us[i];
483 (*fInsertQuery) +=
",";
494 for(
int i=0; i<
n; ++i) {
495 (*fInsertQuery) += ii[i];
496 (*fInsertQuery) +=
",";
506 for(
int i=0; i<
n; ++i) {
507 (*fInsertQuery) += ui[i];
508 (*fInsertQuery) +=
",";
518 for(
int i=0; i<
n; ++i) {
519 (*fInsertQuery)+= l[i];
520 (*fInsertQuery)+=
",";
530 for(
int i=0; i<
n; ++i) {
531 (*fInsertQuery) += ul[i];
532 (*fInsertQuery) +=
",";
542 for(
int i=0; i<
n; ++i) {
543 (*fInsertQuery) += l[i];
544 (*fInsertQuery) +=
",";
554 for(
int i=0; i<
n; ++i) {
555 (*fInsertQuery) += ul[i];
556 (*fInsertQuery) +=
",";
566 for(
int i=0; i<
n; ++i) {
567 (*fInsertQuery) += f[i];
568 (*fInsertQuery) +=
",";
578 for(
int i=0; i<
n; ++i) {
579 (*fInsertQuery) += d[i];
580 (*fInsertQuery )+=
",";
590 Fatal(
"riteFastArray(void*, const TClass*, Int_t, TMemberStreamer *)",
"Not implemented yet");
598 Fatal(
"WriteFastArray(void **, const TClass*, Int_t, Bool_t, TMemberStreamer*)",
"Not implemented yet");
607 for(
int i=0; i<
n; ++i) {
618 for(
int i=0; i<
n; ++i) {
629 strcpy(c,((*fRowPtr)->GetField(*
fIter)));
638 for(
int i=0; i<
n; ++i) {
649 for(
int i=0; i<
n; ++i) {
660 for(
int i=0; i<
n; ++i) {
671 for(
int i=0; i<
n; ++i) {
672 in[i] = atoi((*fRowPtr)->GetField(*
fIter));
682 for(
int i=0; i<
n; ++i) {
683 ui[i] = atoi((*fRowPtr)->GetField(*
fIter));
693 for(
int i=0; i<
n; ++i) {
694 l[i] = atol((*fRowPtr)->GetField(*
fIter));
704 for(
int i=0; i<
n; ++i) {
714 for(
int i=0; i<
n; ++i) {
724 for(
int i=0; i<
n; ++i) {
734 for(
int i=0; i<
n; ++i) {
735 f[i] = atof((*fRowPtr)->GetField(*
fIter));
745 for(
int i=0; i<
n; ++i) {
746 d[i] = atof((*fRowPtr)->GetField(*
fIter));
756 Fatal(
"ReadFastArrayFloat16(Float_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
764 Fatal(
"ReadFastArrayWithFactor(Float_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
772 Fatal(
"ReadFastArrayWithNbits(Float_t *, Int_t , Int_t )",
"Not implemented yet");
780 Fatal(
"ReadFastArrayWithFactor(Double_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
788 Fatal(
"ReadFastArrayWithNbits(Double_t *, Int_t , Int_t )",
"Not implemented yet");
796 Fatal(
"ReadFastArrayDouble32(Double_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
804 Fatal(
"ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
812 Fatal(
"ReadFastArray(void **, const TClass *, Int_t, Bool_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
826 void TBufferSQL::insert_test(
const char* dsn,
const char* usr,
827 const char* pwd,
const TString& tblname)
830 TString select =
"select * from ";
833 sql = select +
"ins";
835 con = gSQLDriverManager->GetConnection(dsn,usr,pwd);
838 printf(
"\n\n\nConnection NOT Successful\n\n\n");
840 printf(
"\n\n\nConnection Sucessful\n\n\n");
842 stmt = con->CreateStatement(0, odbc::ResultSet::CONCUR_READ_ONLY);
844 ptr = stmt->ExecuteQuery(sql.
Data());
845 if(!ptr) printf(
"No recorSet found!");
848 ptr->MoveToInsertRow();
849 std::cerr <<
"IsAfterLast(): " << ptr->IsAfterLast() << std::endl;
850 ptr->UpdateInt(1, 5555);
854 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<<.
virtual void ReadStdString(std::string *s)
Read a std::string.
Implement TBuffer for a SQL backend.
static constexpr double us
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual void WriteChar(Char_t c)
Operator<<.
virtual void WriteCharP(const Char_t *c)
Operator<<.
virtual void WriteCharStar(char *s)
Write char* into TBuffer.
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
virtual void ReadLong(Long_t &l)
Operator>>
virtual void ReadCharStar(char *&s)
Read char* from TBuffer.
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 WriteStdString(const std::string *s)
Write std::string to TBuffer.
virtual void ReadFloat(Float_t &f)
Operator>>
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 ReadStdString(std::string *s)
Read std::string from TBuffer.
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 ReadShort(Short_t &s)
Operator>>
virtual void WriteInt(Int_t i)
Operator<<.
virtual void WriteLong(Long_t l)
Operator<<.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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 WriteCharStar(char *s)
Write a char* string.
virtual void ReadFastArray(Bool_t *, Int_t)
ReadFastArray SQL implementation.
virtual void WriteStdString(const std::string *s)
Write a std::string.
virtual void ReadULong(ULong_t &l)
Operator>>
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
virtual void ReadCharStar(char *&s)
Read a char* string.
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<<.
static constexpr double s
virtual void WriteULong(ULong_t l)
Operator<<.
virtual void ReadDouble(Double_t &d)
Operator>>
virtual void WriteDouble(Double_t d)
Operator<<.
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 Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ReadULong64(ULong64_t &l)
Operator>>
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
const char * Data() const