22 #ifndef __ODBCXX_RESULTSET_H
23 #define __ODBCXX_RESULTSET_H
25 #include <odbc++/setup.h>
26 #include <odbc++/types.h>
27 #include <odbc++/errorhandler.h>
28 #include <odbc++/statement.h>
33 class ResultSetMetaData;
48 int currentFetchSize_;
52 SQLUSMALLINT* rowStatus_;
53 SQLUINTEGER rowsInRowset_;
57 bool streamedColsBound_;
60 unsigned int bindPos_;
73 bool supportsGetDataAnyOrder_;
78 const DriverInfo* _getDriverInfo()
const {
79 return statement_->_getDriverInfo();
83 void _applyFetchSize();
88 void _prepareForFetch();
90 void _doFetch(
int fetchType,
int rowNum);
93 SQLRETURN _applyPosition(
int mode =SQL_POSITION);
100 void _bindStreamedCols();
101 void _unbindStreamedCols();
105 void _handleStreams(SQLRETURN r);
134 TYPE_SCROLL_SENSITIVE
143 bool absolute(
int row);
150 bool relative(
int rows);
162 bool isBeforeFirst();
202 void moveToInsertRow();
207 void moveToCurrentRow();
225 void cancelRowUpdates();
235 int findColumn(
const ODBCXX_STRING& colName);
250 int getConcurrency();
255 return newFetchSize_;
259 void setFetchSize(
int fetchSize);
262 ODBCXX_STRING getCursorName();
272 double getDouble(
int idx);
277 bool getBoolean(
int idx);
282 signed char getByte(
int idx);
288 ODBCXX_BYTES getBytes(
int idx);
293 Date getDate(
int idx);
298 float getFloat(
int idx);
308 Long getLong(
int idx);
313 short getShort(
int idx);
318 ODBCXX_STRING getString(
int idx);
323 Time getTime(
int idx);
333 double getDouble(
const ODBCXX_STRING& colName);
338 bool getBoolean(
const ODBCXX_STRING& colName);
343 signed char getByte(
const ODBCXX_STRING& colName);
349 ODBCXX_BYTES getBytes(
const ODBCXX_STRING& colName);
354 Date getDate(
const ODBCXX_STRING& colName);
359 float getFloat(
const ODBCXX_STRING& colName);
364 int getInt(
const ODBCXX_STRING& colName);
369 Long getLong(
const ODBCXX_STRING& colName);
374 short getShort(
const ODBCXX_STRING& colName);
379 ODBCXX_STRING getString(
const ODBCXX_STRING& colName);
384 Time getTime(
const ODBCXX_STRING& colName);
389 Timestamp getTimestamp(
const ODBCXX_STRING& colName);
399 ODBCXX_STREAM* getAsciiStream(
int idx);
408 ODBCXX_STREAM* getAsciiStream(
const ODBCXX_STRING& colName);
417 ODBCXX_STREAM* getBinaryStream(
int idx);
426 ODBCXX_STREAM* getBinaryStream(
const ODBCXX_STRING& colName);
439 void updateDouble(
int idx,
double val);
445 void updateBoolean(
int idx,
bool val);
451 void updateByte(
int idx,
signed char val);
458 void updateBytes(
int idx,
const ODBCXX_BYTES& val);
464 void updateDate(
int idx,
const Date& val);
470 void updateFloat(
int idx,
float val);
472 #ifdef ODBCXX_HAVE_STRUCT_GUID
477 Guid ResultSet::getGuid(
int idx);
483 void updateInt(
int idx,
int val);
489 void updateLong(
int idx, Long val);
495 void updateShort(
int idx,
short val);
501 void updateString(
int idx,
const ODBCXX_STRING& val);
507 void updateTime(
int idx,
const Time& val);
513 void updateTimestamp(
int idx,
const Timestamp& val);
518 void updateNull(
int idx);
524 void updateDouble(
const ODBCXX_STRING& colName,
double val);
530 void updateBoolean(
const ODBCXX_STRING& colName,
bool val);
536 void updateByte(
const ODBCXX_STRING& colName,
signed char val);
542 void updateBytes(
const ODBCXX_STRING& colName,
const ODBCXX_BYTES& val);
548 void updateDate(
const ODBCXX_STRING& colName,
const Date& val);
554 void updateFloat(
const ODBCXX_STRING& colName,
float val);
560 void updateInt(
const ODBCXX_STRING& colName,
int val);
566 void updateLong(
const ODBCXX_STRING& colName, Long val);
572 void updateShort(
const ODBCXX_STRING& colName,
short val);
578 void updateString(
const ODBCXX_STRING& colName,
const ODBCXX_STRING& val);
584 void updateTime(
const ODBCXX_STRING& colName,
const Time& val);
590 void updateTimestamp(
const ODBCXX_STRING& colName,
const Timestamp& val);
597 void updateAsciiStream(
int idx, ODBCXX_STREAM* s,
int len);
604 void updateAsciiStream(
const ODBCXX_STRING& colName, ODBCXX_STREAM* s,
int len);
611 void updateBinaryStream(
int idx, ODBCXX_STREAM* s,
int len);
618 void updateBinaryStream(
const ODBCXX_STRING& colName, ODBCXX_STREAM* s,
int len);
623 void updateNull(
const ODBCXX_STRING& colName);
629 #endif // __ODBCXX_RESULTSET_H
The result set is scrollable, but the data in it is not affected by changes in the database...
Definition: resultset.h:132
The ResultSet is read only.
Definition: resultset.h:118
The result set only goes forward.
Definition: resultset.h:128
Statement * getStatement()
Gets the Statement that created this result set.
Definition: resultset.h:265
An SQL DATE.
Definition: types.h:457
bool wasNull()
Checks if the last fetched column value was NULL.
Definition: resultset.h:431
An SQL TIME.
Definition: types.h:575
An SQL TIMESTAMP.
Definition: types.h:696
A simple non-prepared statement.
Definition: statement.h:36
int getFetchSize()
Gets this result set's current fetch size.
Definition: resultset.h:254
Base class for everything that might contain warnings.
Definition: errorhandler.h:32
A result set.
Definition: resultset.h:38
ResultSetMetaData * getMetaData()
Returns meta data about this result set.
Definition: resultset.h:230