@@ -51,153 +51,150 @@ class NativeStatementWrapper;
51
51
class MySQL_Prepared_ResultSet : public sql ::ResultSet
52
52
{
53
53
private:
54
- MYSQL_ROW row ;
54
+ boost::shared_ptr< NativeAPI::NativeStatementWrapper > proxy ;
55
55
56
- boost::shared_ptr< NativeAPI::NativeStatementWrapper > proxy;
56
+ mutable uint32_t last_queried_column; // this is updated by calls to getInt(int), getString(int), etc...
57
57
58
- mutable uint32_t last_queried_column; // this is updated by calls to getInt(int), getString(int), etc...
58
+ unsigned int num_fields;
59
+ uint64_t num_rows;
60
+ uint64_t row_position;
59
61
60
- unsigned int num_fields;
61
- uint64_t num_rows;
62
- uint64_t row_position;
62
+ typedef std::map< sql::SQLString, unsigned int > FieldNameIndexMap;
63
63
64
- typedef std::map< sql::SQLString, unsigned int > FieldNameIndexMap;
64
+ FieldNameIndexMap field_name_to_index_map ;
65
65
66
- FieldNameIndexMap field_name_to_index_map;
67
- bool was_null;
66
+ const MySQL_Prepared_Statement * parent;
68
67
69
- const MySQL_Prepared_Statement * parent ;
68
+ bool is_valid ;
70
69
71
- bool is_valid ;
70
+ boost::shared_ptr< MySQL_DebugLogger > logger ;
72
71
73
- boost::shared_ptr< MySQL_DebugLogger > logger ;
72
+ boost::scoped_ptr< MySQL_PreparedResultSetMetaData > rs_meta ;
74
73
75
- boost::scoped_ptr< MySQL_PreparedResultSetMetaData > rs_meta ;
74
+ boost::shared_ptr< MySQL_ResultBind > result_bind ;
76
75
77
- boost::shared_ptr< MySQL_ResultBind > result_bind;
78
-
79
- sql::ResultSet::enum_type resultset_type;
76
+ sql::ResultSet::enum_type resultset_type;
80
77
81
78
protected:
82
- void checkValid () const ;
83
- void checkScrollable () const ;
84
- bool isScrollable () const ;
85
- void closeIntern ();
86
- bool isBeforeFirstOrAfterLast () const ;
87
- void seek ();
79
+ void checkValid () const ;
80
+ void checkScrollable () const ;
81
+ bool isScrollable () const ;
82
+ void closeIntern ();
83
+ bool isBeforeFirstOrAfterLast () const ;
84
+ void seek ();
88
85
89
- int64_t getInt64_intern (const uint32_t columnIndex, bool cutTooBig) const ;
90
- uint64_t getUInt64_intern (const uint32_t columnIndex, bool cutTooBig) const ;
86
+ int64_t getInt64_intern (const uint32_t columnIndex, bool cutTooBig) const ;
87
+ uint64_t getUInt64_intern (const uint32_t columnIndex, bool cutTooBig) const ;
91
88
92
89
public:
93
- MySQL_Prepared_ResultSet (boost::shared_ptr< NativeAPI::NativeStatementWrapper > & s,
94
- boost::shared_ptr< MySQL_ResultBind > & r_bind, sql::ResultSet::enum_type rset_type,
95
- MySQL_Prepared_Statement * par, boost::shared_ptr< MySQL_DebugLogger > &l);
90
+ MySQL_Prepared_ResultSet (boost::shared_ptr< NativeAPI::NativeStatementWrapper > & s,
91
+ boost::shared_ptr< MySQL_ResultBind > & r_bind, sql::ResultSet::enum_type rset_type,
92
+ MySQL_Prepared_Statement * par, boost::shared_ptr< MySQL_DebugLogger > &l);
96
93
97
- virtual ~MySQL_Prepared_ResultSet ();
94
+ virtual ~MySQL_Prepared_ResultSet ();
98
95
99
- bool absolute (int row);
96
+ bool absolute (int row);
100
97
101
- void afterLast ();
98
+ void afterLast ();
102
99
103
- void beforeFirst ();
100
+ void beforeFirst ();
104
101
105
- void cancelRowUpdates ();
102
+ void cancelRowUpdates ();
106
103
107
- void clearWarnings ();
104
+ void clearWarnings ();
108
105
109
- void close ();
106
+ void close ();
110
107
111
- uint32_t findColumn (const sql::SQLString& columnLabel) const ;
108
+ uint32_t findColumn (const sql::SQLString& columnLabel) const ;
112
109
113
- bool first ();
110
+ bool first ();
114
111
115
- std::istream * getBlob (uint32_t columnIndex) const ;
116
- std::istream * getBlob (const sql::SQLString& columnLabel) const ;
112
+ std::istream * getBlob (uint32_t columnIndex) const ;
113
+ std::istream * getBlob (const sql::SQLString& columnLabel) const ;
117
114
118
- bool getBoolean (uint32_t columnIndex) const ;
119
- bool getBoolean (const sql::SQLString& columnLabel) const ;
115
+ bool getBoolean (uint32_t columnIndex) const ;
116
+ bool getBoolean (const sql::SQLString& columnLabel) const ;
120
117
121
- int getConcurrency ();
118
+ int getConcurrency ();
122
119
123
- SQLString getCursorName ();
120
+ SQLString getCursorName ();
124
121
125
- long double getDouble (uint32_t columnIndex) const ;
126
- long double getDouble (const sql::SQLString& columnLabel) const ;
122
+ long double getDouble (uint32_t columnIndex) const ;
123
+ long double getDouble (const sql::SQLString& columnLabel) const ;
127
124
128
- int getFetchDirection ();
129
- size_t getFetchSize ();
130
- int getHoldability ();
125
+ int getFetchDirection ();
126
+ size_t getFetchSize ();
127
+ int getHoldability ();
131
128
132
- int32_t getInt (uint32_t columnIndex) const ;
133
- int32_t getInt (const sql::SQLString& columnLabel) const ;
129
+ int32_t getInt (uint32_t columnIndex) const ;
130
+ int32_t getInt (const sql::SQLString& columnLabel) const ;
134
131
135
- uint32_t getUInt (uint32_t columnIndex) const ;
136
- uint32_t getUInt (const sql::SQLString& columnLabel) const ;
132
+ uint32_t getUInt (uint32_t columnIndex) const ;
133
+ uint32_t getUInt (const sql::SQLString& columnLabel) const ;
137
134
138
- int64_t getInt64 (uint32_t columnIndex) const ;
139
- int64_t getInt64 (const sql::SQLString& columnLabel) const ;
135
+ int64_t getInt64 (uint32_t columnIndex) const ;
136
+ int64_t getInt64 (const sql::SQLString& columnLabel) const ;
140
137
141
- uint64_t getUInt64 (uint32_t columnIndex) const ;
142
- uint64_t getUInt64 (const sql::SQLString& columnLabel) const ;
138
+ uint64_t getUInt64 (uint32_t columnIndex) const ;
139
+ uint64_t getUInt64 (const sql::SQLString& columnLabel) const ;
143
140
144
- sql::ResultSetMetaData * getMetaData () const ;
141
+ sql::ResultSetMetaData * getMetaData () const ;
145
142
146
- size_t getRow () const ;
143
+ size_t getRow () const ;
147
144
148
- sql::RowID * getRowId (uint32_t columnIndex);
149
- sql::RowID * getRowId (const sql::SQLString & columnLabel);
145
+ sql::RowID * getRowId (uint32_t columnIndex);
146
+ sql::RowID * getRowId (const sql::SQLString & columnLabel);
150
147
151
- const sql::Statement * getStatement () const ;
148
+ const sql::Statement * getStatement () const ;
152
149
153
- SQLString getString (uint32_t columnIndex) const ;
154
- SQLString getString (const sql::SQLString& columnLabel) const ;
150
+ SQLString getString (uint32_t columnIndex) const ;
151
+ SQLString getString (const sql::SQLString& columnLabel) const ;
155
152
156
- sql::ResultSet::enum_type getType () const ;
153
+ sql::ResultSet::enum_type getType () const ;
157
154
158
- void getWarnings ();
155
+ void getWarnings ();
159
156
160
- bool isAfterLast () const ;
157
+ bool isAfterLast () const ;
161
158
162
- bool isBeforeFirst () const ;
159
+ bool isBeforeFirst () const ;
163
160
164
- bool isClosed () const ;
161
+ bool isClosed () const ;
165
162
166
- void insertRow ();
163
+ void insertRow ();
167
164
168
- bool isFirst () const ;
165
+ bool isFirst () const ;
169
166
170
- bool isLast () const ;
167
+ bool isLast () const ;
171
168
172
- bool isNull (uint32_t columnIndex) const ;
169
+ bool isNull (uint32_t columnIndex) const ;
173
170
174
- bool isNull (const sql::SQLString& columnLabel) const ;
171
+ bool isNull (const sql::SQLString& columnLabel) const ;
175
172
176
- bool last ();
173
+ bool last ();
177
174
178
- void moveToCurrentRow ();
175
+ void moveToCurrentRow ();
179
176
180
- void moveToInsertRow ();
177
+ void moveToInsertRow ();
181
178
182
- bool next ();
179
+ bool next ();
183
180
184
- bool previous ();
181
+ bool previous ();
185
182
186
- void refreshRow ();
183
+ void refreshRow ();
187
184
188
- bool relative (int rows);
185
+ bool relative (int rows);
189
186
190
- bool rowDeleted ();
187
+ bool rowDeleted ();
191
188
192
- bool rowInserted ();
189
+ bool rowInserted ();
193
190
194
- bool rowUpdated ();
191
+ bool rowUpdated ();
195
192
196
- size_t rowsCount () const ;
193
+ size_t rowsCount () const ;
197
194
198
- void setFetchSize (size_t rows);
195
+ void setFetchSize (size_t rows);
199
196
200
- bool wasNull () const ;
197
+ bool wasNull () const ;
201
198
};
202
199
203
200
} /* namespace mysql*/
0 commit comments