Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6dbcstmt.h
Go to the documentation of this file.
1 
10 #ifndef P6DBCSTMT_H__
11 #define P6DBCSTMT_H__ 1
12 
13 #include "p6com.h"
14 #include "p6dbcresultset.h"
15 
16 namespace P6R {
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
35 typedef P6VOID (*P6DBCQUERYRESULT) ( P6ERR resultCode, p6IDBCResultSet* pResults, P6UINT32 rowCount, P6VOID *pCtx );
36 
37 
38 
45 interface p6IDBCStmt : public p6ICom
46 {
59  P6COMMETHOD bindInteger( P6UINT32 index, P6INT32 value ) = 0;
60 
73  P6COMMETHOD bindUnsigned( P6UINT32 index, P6UINT32 value ) = 0;
74 
87  P6COMMETHOD bindLong( P6UINT32 index, P6INT64 value ) = 0;
88 
101  P6COMMETHOD bindUnsignedLong( P6UINT32 index, P6UINT64 value ) = 0;
102 
115  P6COMMETHOD bindDouble( P6UINT32 index, P6FLOAT value ) = 0;
116 
130  P6COMMETHOD bindString( P6UINT32 index, const P6WCHAR* pString ) = 0;
131 
144  P6COMMETHOD bindDate( P6UINT32 index, P6TIME time ) = 0;
145 
163  P6COMMETHOD bindBlob( P6UINT32 index, P6UINT8* pBlob, P6UINT32 length ) = 0;
164 
176  P6COMMETHOD bindNULL( P6UINT32 index ) = 0;
177 
187 
215  P6VOID* pCtx,
216  p6IDBCResultSet** pResults,
217  P6UINT32* pRowCount
218  ) = 0;
219 };
220 
221 // {3DFB911A-E97B-407c-97AF-FE33B3BB2FC8}
222 #define IF_p6IDBCStmt {0x3dfb911a,0xe97b,0x407c,{0x97,0xaf,0xfe,0x33,0xb3,0xbb,0x2f,0xc8}}
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 } // namespace
229 
230 
231 #endif
232 
233 
234 
235 
236 
237 
P6LONGLONG P6INT64
Definition: p6types.h:50
virtual P6R::P6ERR bindNULL(P6UINT32 index)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the 'NULL' v...
virtual P6R::P6ERR bindUnsigned(P6UINT32 index, P6UINT32 value)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the unsigned...
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR bindInteger(P6UINT32 index, P6INT32 value)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the signed i...
virtual P6R::P6ERR bindBlob(P6UINT32 index, P6UINT8 *pBlob, P6UINT32 length)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the string...
This interface supports the creation of a prepared statement which allows binding of values to variab...
Definition: p6dbcstmt.h:45
virtual P6R::P6ERR bindString(P6UINT32 index, const P6WCHAR *pString)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the string...
unsigned char P6UINT8
Definition: p6types.h:30
P6R's database Result Set Interface.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR execute(P6DBCQUERYRESULT pfn, P6VOID *pCtx, p6IDBCResultSet **pResults, P6UINT32 *pRowCount)=0
Result of the prepared statement when applied against the connected database.
P6ULONGLONG P6UINT64
Definition: p6types.h:49
P6VOID(* P6DBCQUERYRESULT)(P6ERR resultCode, p6IDBCResultSet *pResults, P6UINT32 rowCount, P6VOID *pCtx)
P6DBCQUERYRESULT.
Definition: p6dbcstmt.h:35
P6UINT32 P6ERR
COM err return type see P6ERR.h.
Definition: p6types.h:109
virtual P6R::P6ERR clearBindings()=0
Reset all the variables, '? in SQLite' and '$ in Postgres', in the prepared SQL statement to empty...
virtual P6R::P6ERR bindUnsignedLong(P6UINT32 index, P6UINT64 value)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the unsigned...
#define P6COMMETHOD
Definition: p6types.h:872
P6INT64 P6TIME
The wallclock time represented as the number of microseconds since midnight January 1 1970 UTC...
Definition: p6types.h:228
double P6FLOAT
Definition: p6types.h:63
virtual P6R::P6ERR bindDouble(P6UINT32 index, P6FLOAT value)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the double '...
This interface provides a enumerator type interface to the result set of a query. ...
P6COM definitions and interfaces.
void P6VOID
Definition: p6types.h:75
virtual P6R::P6ERR bindLong(P6UINT32 index, P6INT64 value)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the signed 6...
virtual P6R::P6ERR bindDate(P6UINT32 index, P6TIME time)=0
Replace the nth index, '? in SQLite' and '$ in Postgres', in the prepared statement with the time val...