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.
virtual void ReadCharStar(char *&s)
Read char* from TBuffer.
virtual void WriteStdString(const std::string *s)
Write std::string to TBuffer.
virtual void ReadStdString(std::string *s)
Read std::string from TBuffer.
virtual void WriteCharStar(char *s)
Write char* into TBuffer.
Implement TBuffer for a SQL backend.
virtual void ReadDouble(Double_t &d)
Operator>>
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of Float16_t from buffer.
virtual void ReadBool(Bool_t &b)
Operator>>
virtual void ReadFastArray(Bool_t *, Int_t)
ReadFastArray SQL implementation.
virtual void WriteDouble(Double_t d)
Operator<<.
virtual void WriteCharP(const Char_t *c)
Operator<<.
virtual void WriteInt(Int_t i)
Operator<<.
virtual void WriteStdString(const std::string *s)
Write a std::string.
virtual void ReadStdString(std::string *s)
Read a std::string.
virtual void ReadChar(Char_t &c)
Operator>>
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
virtual void WriteULong(ULong_t l)
Operator<<.
virtual void WriteLong64(Long64_t l)
Operator<<.
virtual void WriteUInt(UInt_t i)
Operator<<.
virtual void WriteLong(Long_t l)
Operator<<.
virtual void WriteUChar(UChar_t c)
Operator<<.
virtual void ReadUChar(UChar_t &c)
Operator>>
std::vector< Int_t > * fColumnVec
virtual void WriteBool(Bool_t b)
Operator<<.
virtual void ReadULong(ULong_t &l)
Operator>>
virtual void WriteCharStar(char *s)
Write a char* string.
virtual void ReadTString(TString &s)
Read a TString.
virtual void ReadLong(Long_t &l)
Operator>>
virtual void ReadShort(Short_t &s)
Operator>>
virtual void WriteULong64(ULong64_t l)
Operator<<.
virtual void ReadInt(Int_t &i)
Operator>>
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
WriteFastArray SQL implementation.
virtual void ReadFloat(Float_t &f)
Operator>>
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of Float16_t from buffer.
virtual void ReadUShort(UShort_t &s)
Operator>>
virtual void WriteFloat(Float_t f)
Operator<<.
std::vector< Int_t >::const_iterator fIter
virtual void WriteUShort(UShort_t s)
Operator<<.
virtual void ReadUInt(UInt_t &i)
Operator>>
virtual void ReadLong64(Long64_t &l)
Operator>>
void ResetOffset()
Reset Offset.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
WriteFastArray SQL implementation.
virtual void ReadFastArrayString(Char_t *, Int_t)
ReadFastArray SQL implementation.
virtual void ReadCharStar(char *&s)
Read a char* string.
virtual void WriteTString(const TString &s)
Write a TString.
virtual void ReadCharP(Char_t *c)
Operator>>
virtual void ReadULong64(ULong64_t &l)
Operator>>
virtual void WriteShort(Short_t s)
Operator<<.
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
virtual void WriteChar(Char_t c)
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