35 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(
r)
46 fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(
r)
58 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));
300 s = (*fRowPtr)->GetField(*
fIter);
309 (*fInsertQuery) +=
s;
310 (*fInsertQuery) +=
",";
356 (*fInsertQuery) += uc;
357 (*fInsertQuery) +=
",";
366 (*fInsertQuery) +=
us;
367 (*fInsertQuery) +=
",";
376 (*fInsertQuery) += ui;
377 (*fInsertQuery) +=
",";
386 (*fInsertQuery) += ul;
387 (*fInsertQuery) +=
",";
396 (*fInsertQuery) += ll;
397 (*fInsertQuery) +=
",";
406 (*fInsertQuery) += ull;
407 (*fInsertQuery) +=
",";
416 (*fInsertQuery) +=
"\"";
417 (*fInsertQuery) += str;
418 (*fInsertQuery) +=
"\",";
427 for(
int i=0; i<
n; ++i) {
428 (*fInsertQuery) +=
b[i];
429 (*fInsertQuery) +=
",";
439 for(
int i=0; i<
n; ++i) {
441 (*fInsertQuery) +=
",";
451 (*fInsertQuery) +=
"\"";
452 (*fInsertQuery) +=
c;
453 (*fInsertQuery) +=
"\",";
462 for(
int i=0; i<
n; ++i) {
463 (*fInsertQuery) += uc[i];
464 (*fInsertQuery) +=
",";
474 for(
int i=0; i<
n; ++i) {
475 (*fInsertQuery) +=
h[i];
476 (*fInsertQuery) +=
",";
486 for(
int i=0; i<
n; ++i) {
487 (*fInsertQuery) +=
us[i];
488 (*fInsertQuery) +=
",";
499 for(
int i=0; i<
n; ++i) {
500 (*fInsertQuery) += ii[i];
501 (*fInsertQuery) +=
",";
511 for(
int i=0; i<
n; ++i) {
512 (*fInsertQuery) += ui[i];
513 (*fInsertQuery) +=
",";
523 for(
int i=0; i<
n; ++i) {
524 (*fInsertQuery)+=
l[i];
525 (*fInsertQuery)+=
",";
535 for(
int i=0; i<
n; ++i) {
536 (*fInsertQuery) += ul[i];
537 (*fInsertQuery) +=
",";
547 for(
int i=0; i<
n; ++i) {
548 (*fInsertQuery) +=
l[i];
549 (*fInsertQuery) +=
",";
559 for(
int i=0; i<
n; ++i) {
560 (*fInsertQuery) += ul[i];
561 (*fInsertQuery) +=
",";
571 for(
int i=0; i<
n; ++i) {
572 (*fInsertQuery) +=
f[i];
573 (*fInsertQuery) +=
",";
583 for(
int i=0; i<
n; ++i) {
584 (*fInsertQuery) +=
d[i];
585 (*fInsertQuery )+=
",";
595 Fatal(
"WriteFastArray(void*, const TClass*, Int_t, TMemberStreamer *)",
"Not implemented yet");
603 Fatal(
"WriteFastArray(void **, const TClass*, Int_t, Bool_t, TMemberStreamer*)",
"Not implemented yet");
612 for(
int i=0; i<
n; ++i) {
623 for(
int i=0; i<
n; ++i) {
634 strcpy(
c,((*fRowPtr)->GetField(*
fIter)));
643 for(
int i=0; i<
n; ++i) {
654 for(
int i=0; i<
n; ++i) {
665 for(
int i=0; i<
n; ++i) {
676 for(
int i=0; i<
n; ++i) {
677 in[i] = atoi((*fRowPtr)->GetField(*
fIter));
687 for(
int i=0; i<
n; ++i) {
688 ui[i] = atoi((*fRowPtr)->GetField(*
fIter));
698 for(
int i=0; i<
n; ++i) {
699 l[i] = atol((*fRowPtr)->GetField(*
fIter));
709 for(
int i=0; i<
n; ++i) {
719 for(
int i=0; i<
n; ++i) {
729 for(
int i=0; i<
n; ++i) {
739 for(
int i=0; i<
n; ++i) {
740 f[i] = atof((*fRowPtr)->GetField(*
fIter));
750 for(
int i=0; i<
n; ++i) {
751 d[i] = atof((*fRowPtr)->GetField(*
fIter));
761 Fatal(
"ReadFastArrayFloat16(Float_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
769 Fatal(
"ReadFastArrayWithFactor(Float_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
777 Fatal(
"ReadFastArrayWithNbits(Float_t *, Int_t , Int_t )",
"Not implemented yet");
785 Fatal(
"ReadFastArrayWithFactor(Double_t *, Int_t, Double_t, Double_t)",
"Not implemented yet");
793 Fatal(
"ReadFastArrayWithNbits(Double_t *, Int_t , Int_t )",
"Not implemented yet");
801 Fatal(
"ReadFastArrayDouble32(Double_t *, Int_t , TStreamerElement *)",
"Not implemented yet");
809 Fatal(
"ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
817 Fatal(
"ReadFastArray(void **, const TClass *, Int_t, Bool_t, TMemberStreamer *, const TClass *)",
"Not implemented yet");
831void TBufferSQL::insert_test(
const char* dsn,
const char* usr,
832 const char* pwd,
const TString& tblname)
835 TString select =
"select * from ";
838 sql = select +
"ins";
840 con = gSQLDriverManager->GetConnection(dsn,usr,pwd);
843 printf(
"\n\n\nConnection NOT Successful\n\n\n");
845 printf(
"\n\n\nConnection Sucessful\n\n\n");
847 stmt = con->CreateStatement(0, odbc::ResultSet::CONCUR_READ_ONLY);
849 ptr = stmt->ExecuteQuery(sql.
Data());
850 if(!ptr) printf(
"No recorSet found!");
853 ptr->MoveToInsertRow();
854 std::cerr <<
"IsAfterLast(): " << ptr->IsAfterLast() << std::endl;
855 ptr->UpdateInt(1, 5555);
859 ptr1 = stmt->ExecuteQuery(sql.
Data());
unsigned long long ULong64_t
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void ReadCharStar(char *&s) override
Read char* from TBuffer.
void WriteCharStar(char *s) override
Write char* into TBuffer.
void WriteStdString(const std::string *s) override
Write std::string to TBuffer.
void ReadStdString(std::string *s) override
Read std::string from TBuffer.
Implement TBuffer for a SQL backend.
void ReadLong(Long_t &l) final
Operator>>
void WriteDouble(Double_t d) final
Operator<<.
void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=nullptr) final
ReadFastArray SQL implementation.
void WriteFastArray(const Bool_t *b, Int_t n) final
WriteFastArray SQL implementation.
void WriteULong(ULong_t l) final
Operator<<.
void WriteUInt(UInt_t i) final
Operator<<.
void WriteFloat(Float_t f) final
Operator<<.
void ReadULong64(ULong64_t &l) final
Operator>>
void ReadCharStar(char *&s) final
Read a char* string.
void ReadInt(Int_t &i) final
Operator>>
void ReadTString(TString &s) final
Read a TString.
void WriteUChar(UChar_t c) final
Operator<<.
void WriteShort(Short_t s) final
Operator<<.
void WriteUShort(UShort_t s) final
Operator<<.
void ReadBool(Bool_t &b) final
Operator>>
void ReadShort(Short_t &s) final
Operator>>
void WriteLong(Long_t l) final
Operator<<.
void ReadLong64(Long64_t &l) final
Operator>>
void ReadChar(Char_t &c) final
Operator>>
std::vector< Int_t > * fColumnVec
void WriteFastArrayString(const Char_t *c, Int_t n) final
WriteFastArray SQL implementation.
void ReadFastArrayString(Char_t *, Int_t) final
ReadFastArray SQL implementation.
void WriteStdString(const std::string *s) final
Write a std::string.
void ReadStdString(std::string *s) final
Read a std::string.
void WriteInt(Int_t i) final
Operator<<.
void ReadFastArray(Bool_t *, Int_t) final
ReadFastArray SQL implementation.
void ReadUShort(UShort_t &s) final
Operator>>
void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue) final
Read array of Float16_t from buffer.
void WriteTString(const TString &s) final
Write a TString.
void ReadUInt(UInt_t &i) final
Operator>>
void WriteBool(Bool_t b) final
Operator<<.
void WriteULong64(ULong64_t l) final
Operator<<.
void ReadCharP(Char_t *c) final
Operator>>
void WriteCharStar(char *s) final
Write a char* string.
void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits) final
Read array of Float16_t from buffer.
std::vector< Int_t >::const_iterator fIter
void ResetOffset()
Reset Offset.
void WriteCharP(const Char_t *c) final
Operator<<.
void WriteLong64(Long64_t l) final
Operator<<.
void ReadDouble(Double_t &d) final
Operator>>
void ReadULong(ULong_t &l) final
Operator>>
void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=nullptr) final
ReadFastArray SQL implementation.
void ReadFloat(Float_t &f) final
Operator>>
void WriteChar(Char_t c) final
Operator<<.
void ReadUChar(UChar_t &c) final
Operator>>
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
const char * Data() const
static constexpr double us
static constexpr double s