12#ifndef ROOT_TMySQLStatement
13#define ROOT_TMySQLStatement
20#if MYSQL_VERSION_ID < 40100
27#ifndef MARIADB_VERSION_ID
28#if MYSQL_VERSION_ID > 80000 && MYSQL_VERSION_ID < 100000
unsigned long long ULong64_t
#define ClassDef(name, id)
static ULong64_t fgAllocSizeLimit
void SetBuffersNumber(Int_t n)
Allocate buffers for statement parameters/ result fields.
void * BeforeSet(const char *method, Int_t npar, Int_t sqltype, Bool_t sig=kTRUE, ULong_t size=0)
Check boundary condition before setting value of parameter.
virtual Int_t GetNumFields()
Return number of fields in result set.
virtual Bool_t GetTimestamp(Int_t npar, Int_t &year, Int_t &month, Int_t &day, Int_t &hour, Int_t &min, Int_t &sec, Int_t &)
Return field value as time stamp.
virtual const char * GetString(Int_t npar)
Return field value as string.
Bool_t IsSetParsMode() const
indicates when parameters bind should be called
virtual Bool_t SetString(Int_t npar, const char *value, Int_t maxsize=256)
Set parameter value as string.
const char * ConvertToString(Int_t npar)
Convert field value to string.
TMySQLStatement(const TMySQLStatement &)
virtual Bool_t Process()
Process statement.
static ULong_t GetAllocSizeLimit()
virtual Bool_t GetTime(Int_t npar, Int_t &hour, Int_t &min, Int_t &sec)
Return field value as time.
virtual Int_t GetBufferLength() const
virtual Bool_t SetDate(Int_t npar, Int_t year, Int_t month, Int_t day)
Set parameter value as date.
virtual Bool_t GetBinary(Int_t npar, void *&mem, Long_t &size)
Return field value as binary array.
virtual Int_t GetNumAffectedRows()
Return number of affected rows after statement is processed.
virtual Bool_t NextResultRow()
Shift cursor to nect row in result set.
virtual Bool_t SetULong64(Int_t npar, ULong64_t value)
Set parameter value as unsigned 64-bit integer.
Int_t fWorkingMode
parameter definition structures
virtual Long_t GetLong(Int_t npar)
Return field value as long integer.
static void SetAllocSizeLimit(ULong_t sz)
void FreeBuffers()
Release all buffers, used by statement.
Int_t fIterationCount
1 - setting parameters, 2 - retrieving results
virtual Bool_t SetDouble(Int_t npar, Double_t value)
Set parameter value as double.
virtual Bool_t SetInt(Int_t npar, Int_t value)
Set parameter value as integer.
virtual Bool_t SetDatime(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
Set parameter value as date & time.
virtual Bool_t IsNull(Int_t npar)
Checks if field value is null.
Bool_t IsResultSetMode() const
virtual ~TMySQLStatement()
Destructor.
Bool_t SetSQLParamType(Int_t npar, int sqltype, Bool_t sig, ULong_t sqlsize=0)
Set parameter type to be used as buffer.
virtual Bool_t SetLong(Int_t npar, Long_t value)
Set parameter value as long integer.
virtual Bool_t SetTime(Int_t npar, Int_t hour, Int_t min, Int_t sec)
Set parameter value as time.
virtual void Close(Option_t *="")
Close statement.
TParamData * fBuffer
array of bind data
virtual Bool_t SetUInt(Int_t npar, UInt_t value)
Set parameter value as unsigned integer.
virtual Bool_t NextIteration()
Increment iteration counter for statement, where parameter can be set.
TMySQLStatement & operator=(const TMySQLStatement &)
Bool_t fNeedParBind
number of iteration
virtual Bool_t SetNull(Int_t npar)
Set NULL as parameter value.
virtual Bool_t SetTimestamp(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec, Int_t frac=0)
Set parameter value as timestamp.
virtual UInt_t GetUInt(Int_t npar)
Return field value as unsigned integer.
virtual Int_t GetInt(Int_t npar)
Return field value as integer.
virtual Bool_t SetLong64(Int_t npar, Long64_t value)
Set parameter value as 64-bit integer.
virtual Bool_t GetDate(Int_t npar, Int_t &year, Int_t &month, Int_t &day)
Return field value as date.
virtual ULong64_t GetULong64(Int_t npar)
Return field value as unsigned 64-bit integer.
Int_t fNumBuffers
executed statement
virtual const char * GetFieldName(Int_t nfield)
Returns field name in result set.
virtual Double_t GetDouble(Int_t npar)
Return field value as double.
virtual Bool_t SetBinary(Int_t npar, void *mem, Long_t size, Long_t maxsize=0x1000)
Set parameter value as binary data.
virtual Bool_t StoreResult()
Store result of statement processing to access them via GetInt(), GetDouble() and so on methods.
virtual Int_t GetNumParameters()
Return number of statement parameters.
virtual Bool_t GetDatime(Int_t npar, Int_t &year, Int_t &month, Int_t &day, Int_t &hour, Int_t &min, Int_t &sec)
Return field value as date & time.
virtual Long64_t GetLong64(Int_t npar)
Return field value as 64-bit integer.
long double ConvertToNumeric(Int_t npar)
Convert field to numeric value.
MYSQL_BIND * fBind
number of statement parameters
char * fFieldName
special buffer to be used for string conversions
Bool_t fSign
sqltype of parameter
char * fStrBuffer
indicates if argument is null
ULong_t fResLength
signed - not signed type
Int_t fSize
allocated data buffer
my_bool fResNull
length argument
Int_t fSqlType
size of allocated data