KaliVeda
Toolkit for HIC analysis
KVSQLiteStatement Class Reference

Detailed Description

Modified copy of TSQLiteStatement.

The Process() method is modified so that if the database is locked by another process/thread, we try again a maximum of 4 times with a sleep of 50 ms between each attempt.

Definition at line 34 of file KVSQLiteStatement.h.

#include <KVSQLiteStatement.h>

Inheritance diagram for KVSQLiteStatement:

Public Member Functions

 KVSQLiteStatement (SQLite3_Stmt_t *stmt, Bool_t errout=kTRUE)
 
virtual ~KVSQLiteStatement ()
 Destructor. More...
 
 ClassDefOverride (KVSQLiteStatement, 0)
 
void Close (Option_t *="") final
 Close statement. More...
 
Bool_t GetBinary (Int_t npar, void *&mem, Long_t &size) final
 
Int_t GetBufferLength () const final
 
Bool_t GetDate (Int_t npar, Int_t &year, Int_t &month, Int_t &day) final
 Return field value as date. More...
 
Bool_t GetDatime (Int_t npar, Int_t &year, Int_t &month, Int_t &day, Int_t &hour, Int_t &min, Int_t &sec) final
 Return field value as date & time. More...
 
Double_t GetDouble (Int_t npar) final
 Return field value as double. More...
 
const char * GetFieldName (Int_t nfield) final
 Returns field name in result set. More...
 
Int_t GetInt (Int_t npar) final
 Get integer. More...
 
Long_t GetLong (Int_t npar) final
 Get long. More...
 
Long64_t GetLong64 (Int_t npar) final
 Get long64. More...
 
Int_t GetNumAffectedRows () final
 
Int_t GetNumFields () final
 Return number of fields in result set. More...
 
Int_t GetNumParameters () final
 Return number of statement parameters. More...
 
const char * GetString (Int_t npar) final
 Return field value as string. More...
 
Bool_t GetTime (Int_t npar, Int_t &hour, Int_t &min, Int_t &sec) final
 Return field as time. More...
 
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 &) final
 
TDatime GetTimestamp (Int_t)
 
virtual Bool_t GetTimestamp (Int_t, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &)
 
virtual Bool_t GetTimestamp (Int_t, TTimeStamp &)
 
UInt_t GetUInt (Int_t npar) final
 Get unsigned integer. More...
 
ULong64_t GetULong64 (Int_t npar) final
 Return field value as unsigned 64-bit integer. More...
 
Bool_t IsNull (Int_t npar) final
 Checks if field value is null. More...
 
Bool_t NextIteration () final
 
Bool_t NextResultRow () final
 Shift cursor to next row in result set. More...
 
Bool_t Process () final
 Process statement. More...
 
Bool_t SetBinary (Int_t npar, void *mem, Long_t size, Long_t maxsize=0x1000) final
 
Bool_t SetDate (Int_t npar, Int_t year, Int_t month, Int_t day) final
 Set parameter value as date. More...
 
Bool_t SetDatime (Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec) final
 Set parameter value as date & time. More...
 
Bool_t SetDouble (Int_t npar, Double_t value) final
 Set parameter value as double value. More...
 
Bool_t SetInt (Int_t npar, Int_t value) final
 Set parameter value as integer. More...
 
Bool_t SetLong (Int_t npar, Long_t value) final
 Set parameter value as long. More...
 
Bool_t SetLong64 (Int_t npar, Long64_t value) final
 Set parameter value as 64-bit integer. More...
 
Bool_t SetNull (Int_t npar) final
 Set NULL as parameter value. More...
 
Bool_t SetString (Int_t npar, const char *value, Int_t maxsize=256) final
 Set parameter value as string. More...
 
Bool_t SetTime (Int_t npar, Int_t hour, Int_t min, Int_t sec) final
 Set parameter value as time. More...
 
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) final
 
Bool_t SetTimestamp (Int_t, const TDatime &)
 
virtual Bool_t SetTimestamp (Int_t, const TTimeStamp &)
 
virtual Bool_t SetTimestamp (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t=0)
 
Bool_t SetUInt (Int_t npar, UInt_t value) final
 
Bool_t SetULong64 (Int_t npar, ULong64_t value) final
 
Bool_t StoreResult () final
 
- Public Member Functions inherited from TSQLStatement
virtual ~TSQLStatement ()=default
 
virtual void EnableErrorOutput (Bool_t on=kTRUE)
 
TDatime GetDatime (Int_t)
 
Int_t GetDay (Int_t)
 
virtual Int_t GetErrorCode () const
 
virtual const char * GetErrorMsg () const
 
Int_t GetHour (Int_t)
 
virtual Bool_t GetLargeObject (Int_t col, void *&mem, Long_t &size)
 
Int_t GetMinute (Int_t)
 
Int_t GetMonth (Int_t)
 
Int_t GetSecond (Int_t)
 
Int_t GetSecondsFraction (Int_t)
 
TDatime GetTimestamp (Int_t)
 
virtual Bool_t GetTimestamp (Int_t, TTimeStamp &)
 
virtual Bool_t GetVDouble (Int_t, std::vector< Double_t > &)
 
virtual Bool_t GetVInt (Int_t, std::vector< Int_t > &)
 
virtual Bool_t GetVLong (Int_t, std::vector< Long_t > &)
 
virtual Bool_t GetVLong64 (Int_t, std::vector< Long64_t > &)
 
virtual Bool_t GetVUInt (Int_t, std::vector< UInt_t > &)
 
virtual Bool_t GetVULong64 (Int_t, std::vector< ULong64_t > &)
 
Int_t GetYear (Int_t)
 
TClassIsA () const override
 
virtual Bool_t IsError () const
 
Bool_t SetDate (Int_t, const TDatime &)
 
Bool_t SetDatime (Int_t, const TDatime &)
 
virtual Bool_t SetLargeObject (Int_t col, void *mem, Long_t size, Long_t maxsize=0x1000)
 
virtual Bool_t SetMaxFieldSize (Int_t, Long_t)
 
Bool_t SetTime (Int_t, const TDatime &)
 
virtual void SetTimeFormating (const char *)
 
Bool_t SetTimestamp (Int_t, const TDatime &)
 
virtual Bool_t SetTimestamp (Int_t, const TTimeStamp &)
 
virtual Bool_t SetVDouble (Int_t, const std::vector< Double_t >, const char *, const char *)
 
virtual Bool_t SetVInt (Int_t, const std::vector< Int_t >, const char *, const char *)
 
virtual Bool_t SetVLong (Int_t, const std::vector< Long_t >, const char *, const char *)
 
virtual Bool_t SetVLong64 (Int_t, const std::vector< Long64_t >, const char *, const char *)
 
virtual Bool_t SetVUInt (Int_t, const std::vector< UInt_t >, const char *, const char *)
 
virtual Bool_t SetVULong64 (Int_t, const std::vector< ULong64_t >, const char *, const char *)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void Copy (TObject &object) const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual const char * GetName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
virtual ULong_t Hash () const
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual void Print (Option_t *option="") const
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 

Private Member Functions

Bool_t CheckBindError (const char *method, int res)
 
long double ConvertToNumeric (Int_t npar)
 Convert field to numeric. More...
 
const char * ConvertToString (Int_t npar)
 Convert field value to string. More...
 
Bool_t IsResultSetMode () const
 
Bool_t IsSetParsMode () const
 Iteration count. More...
 
Bool_t SetSQLParamType (Int_t npar, int sqltype, bool sig, int sqlsize=0)
 

Private Attributes

Int_t fIterationCount {0}
 Number of bindable / gettable parameters. More...
 
Int_t fNumPars {0}
 1 - setting parameters, 2 - retrieving results More...
 
SQLite3_Stmt_tfStmt {nullptr}
 
Int_t fWorkingMode {0}
 executed statement More...
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from TSQLStatement
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TSQLStatement
 TSQLStatement (Bool_t errout=kTRUE)
 
void ClearError ()
 
void SetError (Int_t code, const char *msg, const char *method=nullptr)
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 
- Protected Attributes inherited from TSQLStatement
Int_t fErrorCode
 
TString fErrorMsg
 
Bool_t fErrorOut
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Constructor & Destructor Documentation

◆ KVSQLiteStatement()

KVSQLiteStatement::KVSQLiteStatement ( SQLite3_Stmt_t stmt,
Bool_t  errout = kTRUE 
)

Normal constructor. Checks if statement contains parameters tags.

Definition at line 42 of file KVSQLiteStatement.cxx.

◆ ~KVSQLiteStatement()

KVSQLiteStatement::~KVSQLiteStatement ( )
virtual

Destructor.

Definition at line 68 of file KVSQLiteStatement.cxx.

Member Function Documentation

◆ CheckBindError()

Bool_t KVSQLiteStatement::CheckBindError ( const char *  method,
int  res 
)
private

Definition at line 143 of file KVSQLiteStatement.cxx.

◆ ClassDefOverride()

KVSQLiteStatement::ClassDefOverride ( KVSQLiteStatement  ,
 
)

◆ Close()

void KVSQLiteStatement::Close ( Option_t = "")
finalvirtual

Close statement.

Reimplemented from TSQLStatement.

Definition at line 80 of file KVSQLiteStatement.cxx.

◆ ConvertToNumeric()

long double KVSQLiteStatement::ConvertToNumeric ( Int_t  npar)
private

Convert field to numeric.

Definition at line 374 of file KVSQLiteStatement.cxx.

◆ ConvertToString()

const char * KVSQLiteStatement::ConvertToString ( Int_t  npar)
private

Convert field value to string.

Definition at line 360 of file KVSQLiteStatement.cxx.

◆ GetBinary()

Bool_t KVSQLiteStatement::GetBinary ( Int_t  npar,
void *&  mem,
Long_t size 
)
finalvirtual

Return field value as binary array. Memory at 'mem' will be reallocated and size updated to fit the data if not large enough.

Reimplemented from TSQLStatement.

Definition at line 502 of file KVSQLiteStatement.cxx.

◆ GetBufferLength()

Int_t KVSQLiteStatement::GetBufferLength ( ) const
inlinefinalvirtual

Implements TSQLStatement.

Definition at line 64 of file KVSQLiteStatement.h.

◆ GetDate()

Bool_t KVSQLiteStatement::GetDate ( Int_t  npar,
Int_t year,
Int_t month,
Int_t day 
)
finalvirtual

Return field value as date.

Reimplemented from TSQLStatement.

Definition at line 528 of file KVSQLiteStatement.cxx.

◆ GetDatime()

Bool_t KVSQLiteStatement::GetDatime ( Int_t  npar,
Int_t year,
Int_t month,
Int_t day,
Int_t hour,
Int_t min,
Int_t sec 
)
finalvirtual

Return field value as date & time.

Reimplemented from TSQLStatement.

Definition at line 568 of file KVSQLiteStatement.cxx.

◆ GetDouble()

Double_t KVSQLiteStatement::GetDouble ( Int_t  npar)
finalvirtual

Return field value as double.

Reimplemented from TSQLStatement.

Definition at line 472 of file KVSQLiteStatement.cxx.

◆ GetFieldName()

const char * KVSQLiteStatement::GetFieldName ( Int_t  nfield)
finalvirtual

Returns field name in result set.

Implements TSQLStatement.

Definition at line 289 of file KVSQLiteStatement.cxx.

◆ GetInt()

Int_t KVSQLiteStatement::GetInt ( Int_t  npar)
finalvirtual

Get integer.

Reimplemented from TSQLStatement.

Definition at line 402 of file KVSQLiteStatement.cxx.

◆ GetLong()

Long_t KVSQLiteStatement::GetLong ( Int_t  npar)
finalvirtual

Get long.

Reimplemented from TSQLStatement.

Definition at line 430 of file KVSQLiteStatement.cxx.

◆ GetLong64()

Long64_t KVSQLiteStatement::GetLong64 ( Int_t  npar)
finalvirtual

Get long64.

Reimplemented from TSQLStatement.

Definition at line 444 of file KVSQLiteStatement.cxx.

◆ GetNumAffectedRows()

Int_t KVSQLiteStatement::GetNumAffectedRows ( )
finalvirtual

Return number of affected rows after statement is processed. Indirect changes e.g. by triggers are not counted, only direct changes from last completed statement are taken into account.

Reimplemented from TSQLStatement.

Definition at line 227 of file KVSQLiteStatement.cxx.

◆ GetNumFields()

Int_t KVSQLiteStatement::GetNumFields ( )
finalvirtual

Return number of fields in result set.

Implements TSQLStatement.

Definition at line 277 of file KVSQLiteStatement.cxx.

◆ GetNumParameters()

Int_t KVSQLiteStatement::GetNumParameters ( )
finalvirtual

Return number of statement parameters.

Implements TSQLStatement.

Definition at line 241 of file KVSQLiteStatement.cxx.

◆ GetString()

const char * KVSQLiteStatement::GetString ( Int_t  npar)
finalvirtual

Return field value as string.

Reimplemented from TSQLStatement.

Definition at line 486 of file KVSQLiteStatement.cxx.

◆ GetTime()

Bool_t KVSQLiteStatement::GetTime ( Int_t  npar,
Int_t hour,
Int_t min,
Int_t sec 
)
finalvirtual

Return field as time.

Reimplemented from TSQLStatement.

Definition at line 548 of file KVSQLiteStatement.cxx.

◆ GetTimestamp() [1/4]

Bool_t KVSQLiteStatement::GetTimestamp ( Int_t  npar,
Int_t year,
Int_t month,
Int_t day,
Int_t hour,
Int_t min,
Int_t sec,
Int_t frac 
)
finalvirtual

Return field as timestamp. Second fraction is in milliseconds, which is also the precision all date and time functions of sqlite use.

Reimplemented from TSQLStatement.

Definition at line 592 of file KVSQLiteStatement.cxx.

◆ GetTimestamp() [2/4]

TDatime TSQLStatement::GetTimestamp

◆ GetTimestamp() [3/4]

virtual Bool_t TSQLStatement::GetTimestamp

◆ GetTimestamp() [4/4]

virtual Bool_t TSQLStatement::GetTimestamp

◆ GetUInt()

UInt_t KVSQLiteStatement::GetUInt ( Int_t  npar)
finalvirtual

Get unsigned integer.

Reimplemented from TSQLStatement.

Definition at line 416 of file KVSQLiteStatement.cxx.

◆ GetULong64()

ULong64_t KVSQLiteStatement::GetULong64 ( Int_t  npar)
finalvirtual

Return field value as unsigned 64-bit integer.

Reimplemented from TSQLStatement.

Definition at line 458 of file KVSQLiteStatement.cxx.

◆ IsNull()

Bool_t KVSQLiteStatement::IsNull ( Int_t  npar)
finalvirtual

Checks if field value is null.

Reimplemented from TSQLStatement.

Definition at line 388 of file KVSQLiteStatement.cxx.

◆ IsResultSetMode()

Bool_t KVSQLiteStatement::IsResultSetMode ( ) const
inlineprivate

Definition at line 46 of file KVSQLiteStatement.h.

◆ IsSetParsMode()

Bool_t KVSQLiteStatement::IsSetParsMode ( ) const
inlineprivate

Iteration count.

Definition at line 42 of file KVSQLiteStatement.h.

◆ NextIteration()

Bool_t KVSQLiteStatement::NextIteration ( )
finalvirtual

Increment iteration counter for statement, where parameter can be set. Statement with parameters of previous iteration automatically will be applied to database. Actually a NO-OP for SQLite, as parameters stay bound when step-ping.

Implements TSQLStatement.

Definition at line 331 of file KVSQLiteStatement.cxx.

◆ NextResultRow()

Bool_t KVSQLiteStatement::NextResultRow ( )
finalvirtual

Shift cursor to next row in result set.

Implements TSQLStatement.

Definition at line 304 of file KVSQLiteStatement.cxx.

◆ Process()

Bool_t KVSQLiteStatement::Process ( void  )
finalvirtual

Process statement.

Implements TSQLStatement.

Definition at line 163 of file KVSQLiteStatement.cxx.

◆ SetBinary()

Bool_t KVSQLiteStatement::SetBinary ( Int_t  npar,
void mem,
Long_t  size,
Long_t  maxsize = 0x1000 
)
finalvirtual

Set parameter value as binary data. Maxsize is ignored for SQLite, we directly insert BLOB of size 'size'. Negative size would cause undefined behaviour, so we refuse that.

Reimplemented from TSQLStatement.

Definition at line 738 of file KVSQLiteStatement.cxx.

◆ SetDate()

Bool_t KVSQLiteStatement::SetDate ( Int_t  npar,
Int_t  year,
Int_t  month,
Int_t  day 
)
finalvirtual

Set parameter value as date.

Reimplemented from TSQLStatement.

Definition at line 757 of file KVSQLiteStatement.cxx.

◆ SetDatime()

Bool_t KVSQLiteStatement::SetDatime ( Int_t  npar,
Int_t  year,
Int_t  month,
Int_t  day,
Int_t  hour,
Int_t  min,
Int_t  sec 
)
finalvirtual

Set parameter value as date & time.

Reimplemented from TSQLStatement.

Definition at line 788 of file KVSQLiteStatement.cxx.

◆ SetDouble()

Bool_t KVSQLiteStatement::SetDouble ( Int_t  npar,
Double_t  value 
)
finalvirtual

Set parameter value as double value.

Reimplemented from TSQLStatement.

Definition at line 708 of file KVSQLiteStatement.cxx.

◆ SetInt()

Bool_t KVSQLiteStatement::SetInt ( Int_t  npar,
Int_t  value 
)
finalvirtual

Set parameter value as integer.

Reimplemented from TSQLStatement.

Definition at line 636 of file KVSQLiteStatement.cxx.

◆ SetLong()

Bool_t KVSQLiteStatement::SetLong ( Int_t  npar,
Long_t  value 
)
finalvirtual

Set parameter value as long.

Reimplemented from TSQLStatement.

Definition at line 665 of file KVSQLiteStatement.cxx.

◆ SetLong64()

Bool_t KVSQLiteStatement::SetLong64 ( Int_t  npar,
Long64_t  value 
)
finalvirtual

Set parameter value as 64-bit integer.

Reimplemented from TSQLStatement.

Definition at line 679 of file KVSQLiteStatement.cxx.

◆ SetNull()

Bool_t KVSQLiteStatement::SetNull ( Int_t  npar)
finalvirtual

Set NULL as parameter value.

Reimplemented from TSQLStatement.

Definition at line 622 of file KVSQLiteStatement.cxx.

◆ SetSQLParamType()

Bool_t KVSQLiteStatement::SetSQLParamType ( Int_t  npar,
int  sqltype,
bool  sig,
int  sqlsize = 0 
)
private

◆ SetString()

Bool_t KVSQLiteStatement::SetString ( Int_t  npar,
const char *  value,
Int_t  maxsize = 256 
)
finalvirtual

Set parameter value as string.

Reimplemented from TSQLStatement.

Definition at line 722 of file KVSQLiteStatement.cxx.

◆ SetTime()

Bool_t KVSQLiteStatement::SetTime ( Int_t  npar,
Int_t  hour,
Int_t  min,
Int_t  sec 
)
finalvirtual

Set parameter value as time.

Reimplemented from TSQLStatement.

Definition at line 772 of file KVSQLiteStatement.cxx.

◆ SetTimestamp() [1/4]

Bool_t KVSQLiteStatement::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 
)
finalvirtual

Set parameter value as timestamp. The second fraction has to be in milliseconds, as all SQLite functions for date and time assume 3 significant digits.

Reimplemented from TSQLStatement.

Definition at line 806 of file KVSQLiteStatement.cxx.

◆ SetTimestamp() [2/4]

Bool_t TSQLStatement::SetTimestamp

◆ SetTimestamp() [3/4]

virtual Bool_t TSQLStatement::SetTimestamp

◆ SetTimestamp() [4/4]

virtual Bool_t TSQLStatement::SetTimestamp

◆ SetUInt()

Bool_t KVSQLiteStatement::SetUInt ( Int_t  npar,
UInt_t  value 
)
finalvirtual

Set parameter value as unsigned integer. Actually casted to signed integer, has to be re-casted upon read!

Reimplemented from TSQLStatement.

Definition at line 651 of file KVSQLiteStatement.cxx.

◆ SetULong64()

Bool_t KVSQLiteStatement::SetULong64 ( Int_t  npar,
ULong64_t  value 
)
finalvirtual

Set parameter value as unsigned 64-bit integer. Actually casted to signed integer, has to be re-casted upon read!

Reimplemented from TSQLStatement.

Definition at line 694 of file KVSQLiteStatement.cxx.

◆ StoreResult()

Bool_t KVSQLiteStatement::StoreResult ( )
finalvirtual

Store result of statement processing to access them via GetInt(), GetDouble() and so on methods. For SQLite, this is a NO-OP.

Implements TSQLStatement.

Definition at line 261 of file KVSQLiteStatement.cxx.

Member Data Documentation

◆ fIterationCount

Int_t KVSQLiteStatement::fIterationCount {0}
private

Number of bindable / gettable parameters.

Definition at line 40 of file KVSQLiteStatement.h.

◆ fNumPars

Int_t KVSQLiteStatement::fNumPars {0}
private

1 - setting parameters, 2 - retrieving results

Definition at line 39 of file KVSQLiteStatement.h.

◆ fStmt

SQLite3_Stmt_t* KVSQLiteStatement::fStmt {nullptr}
private

Definition at line 37 of file KVSQLiteStatement.h.

◆ fWorkingMode

Int_t KVSQLiteStatement::fWorkingMode {0}
private

executed statement

Definition at line 38 of file KVSQLiteStatement.h.