32 #ifndef _QORE_QORESQLSTATEMENT_H
33 #define _QORE_QORESQLSTATEMENT_H
35 #include "qore/intern/sql_statement_private.h"
37 #include "qore/intern/DatasourceStatementHelper.h"
40 #define STMT_PREPARED 1
42 #define STMT_DEFINED 3
47 friend class DBActionHelper;
50 DLLLOCAL
static const char* stmt_statuses[];
55 DatasourceStatementHelper* dsh;
61 unsigned char status = STMT_IDLE;
67 DLLLOCAL
int checkStatus(
ExceptionSink* xsink, DBActionHelper& dba,
int stat,
const char* action);
70 DLLLOCAL
int execIntern(DBActionHelper& dba,
ExceptionSink* xsink);
71 DLLLOCAL
int execDescribeIntern(DBActionHelper& dba,
ExceptionSink* xsink);
77 DLLLOCAL QoreSQLStatement(DatasourceStatementHelper* dsh) : dsh(dsh->helperRefSelf()) {
80 DLLLOCAL QoreSQLStatement(
Datasource* ds,
void* data, DatasourceStatementHelper* dsh,
unsigned char status);
82 DLLLOCAL ~QoreSQLStatement();
104 DLLLOCAL
bool valid();
120 DLLLOCAL
bool active()
const;
121 DLLLOCAL
bool currentThreadInTransaction(
ExceptionSink* xsink);
124 DLLLOCAL
void transactionDone(
bool clear,
bool close,
ExceptionSink* xsink);
the base class for all data to be used as private data of Qore objects
Definition: AbstractPrivateData.h:44
virtual DLLLOCAL void deref()
decrements the reference count of the object without the possibility of throwing a Qore-language exce...
Definition: AbstractPrivateData.h:65
the base class for accessing databases in Qore through a Qore DBI driver
Definition: Datasource.h:55
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
This is the public class for DBI drivers supporting Qore's new prepared statement API.
Definition: SQLStatement.h:38