Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSQLiteStatement.cxx File Reference
#include "TSQLiteStatement.h"
#include "TSQLiteResult.h"
#include "TDataType.h"
#include "TDatime.h"
#include "TTimeStamp.h"
#include <sqlite3.h>
#include <stdlib.h>
Include dependency graph for TSQLiteStatement.cxx:

Namespaces

namespace  ROOT
 This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
 

Macros

#define CheckErrNo(method, force, res)
 
#define CheckGetField(method, res)
 
#define CheckStmt(method, res)
 

Macro Definition Documentation

◆ CheckErrNo

#define CheckErrNo (   method,
  force,
  res 
)
Value:
{ \
int stmterrno = sqlite3_errcode(fStmt->fConn); \
if ((stmterrno!=0) || force) { \
const char* stmterrmsg = sqlite3_errmsg(fStmt->fConn); \
if (stmterrno==0) { stmterrno = -1; stmterrmsg = "SQLite statement error"; } \
SetError(stmterrno, stmterrmsg, method); \
return res; \
} \
}

Definition at line 87 of file TSQLiteStatement.cxx.

◆ CheckGetField

#define CheckGetField (   method,
  res 
)
Value:
{ \
ClearError(); \
if (!IsResultSetMode()) { \
SetError(-1,"Cannot get statement parameters",method); \
return res; \
} \
if ((npar<0) || (npar>=fNumPars)) { \
SetError(-1,Form("Invalid parameter number %d", npar),method); \
return res; \
} \
}
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2467

Definition at line 98 of file TSQLiteStatement.cxx.

◆ CheckStmt

#define CheckStmt (   method,
  res 
)
Value:
{ \
ClearError(); \
if (!fStmt) { \
SetError(-1,"Statement handle is 0",method); \
return res; \
} \
}

Definition at line 78 of file TSQLiteStatement.cxx.