22 #ifndef __ODBCXX_RESULTSETMETADATA_H
23 #define __ODBCXX_RESULTSETMETADATA_H
25 #include <odbc++/setup.h>
26 #include <odbc++/types.h>
27 #include <odbc++/resultset.h>
28 #define ODBCXX_USE_INDEXED_METADATA_COLNAMES
33 #ifdef ODBCXX_USE_INDEXED_METADATA_COLNAMES
34 typedef struct caseinsesnless
35 :
public std::less<ODBCXX_STRING>
37 bool operator()(
const ODBCXX_STRING _Left,
const ODBCXX_STRING _Right)
const;
39 #endif // ODBCXX_USE_INDEXED_METADATA_COLNAMES
49 std::vector<ODBCXX_STRING> colNames_;
50 #ifdef ODBCXX_USE_INDEXED_METADATA_COLNAMES
51 std::map<const ODBCXX_STRING, int, CaseInsesitiveLess> colNameIndex_;
52 int findColumn(
const ODBCXX_STRING& colName);
53 #endif // ODBCXX_USE_INDEXED_METADATA_COLNAMES
54 std::vector<int> colTypes_;
55 std::vector<int> colPrecisions_;
56 std::vector<int> colScales_;
58 std::vector<int> colLengths_;
69 const DriverInfo* _getDriverInfo()
const {
70 return resultSet_->_getDriverInfo();
74 int _getNumericAttribute(
unsigned int col, SQLUSMALLINT attr);
75 ODBCXX_STRING _getStringAttribute(
unsigned int col, SQLUSMALLINT attr,
unsigned int maxlen =255);
78 void _fetchColumnInfo();
83 columnNoNulls = SQL_NO_NULLS,
84 columnNullable = SQL_NULLABLE,
85 columnNullableUnknown = SQL_NULLABLE_UNKNOWN
89 int getColumnCount()
const;
94 const ODBCXX_STRING& getColumnName(
int column)
const;
100 int getColumnType(
int column)
const;
105 int getPrecision(
int column)
const;
110 int getScale(
int column)
const;
115 int getColumnDisplaySize(
int column);
120 ODBCXX_STRING getCatalogName(
int column);
125 ODBCXX_STRING getColumnLabel(
int column);
130 ODBCXX_STRING getColumnTypeName(
int column);
135 ODBCXX_STRING getSchemaName(
int column);
140 ODBCXX_STRING getTableName(
int column);
145 bool isAutoIncrement(
int column);
150 bool isCaseSensitive(
int column);
155 bool isCurrency(
int column);
160 bool isDefinitelyWritable(
int column);
165 int isNullable(
int column);
170 bool isReadOnly(
int column);
175 bool isSearchable(
int column);
180 bool isSigned(
int column);
185 bool isWritable(
int column);
193 #endif // __ODBCXX_RESULTSETMETADATA_H
The namespace where all libodbc++ classes reside.
Definition: callablestatement.h:29
A simple non-prepared statement.
Definition: statement.h:36
A result set.
Definition: resultset.h:38