Skip to content

Commit f12791a

Browse files
committed
Put new Vector methods at the end of classes.
1 parent 8388fb8 commit f12791a

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

jdbc/cppconn/prepared_statement.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ class PreparedStatement : public Statement
9090

9191
virtual void setString(unsigned int parameterIndex, const sql::SQLString& value) = 0;
9292

93+
virtual PreparedStatement * setResultSetType(sql::ResultSet::enum_type type) = 0;
94+
9395
virtual void setVector(unsigned int parameterIndex, const std::vector<float>& value) = 0;
9496

95-
virtual PreparedStatement * setResultSetType(sql::ResultSet::enum_type type) = 0;
9697
};
9798

9899

jdbc/cppconn/resultset.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ class ResultSet
138138
virtual SQLString getString(uint32_t columnIndex) const = 0;
139139
virtual SQLString getString(const sql::SQLString& columnLabel) const = 0;
140140

141-
virtual std::vector<float> getVector(uint32_t columnIndex) const = 0;
142-
virtual std::vector<float> getVector(const sql::SQLString &columnLabel) const = 0;
143-
144141
virtual enum_type getType() const = 0;
145142

146143
virtual void getWarnings() = 0;
@@ -185,6 +182,9 @@ class ResultSet
185182
virtual size_t rowsCount() const = 0;
186183

187184
virtual bool wasNull() const = 0;
185+
186+
virtual std::vector<float> getVector(uint32_t columnIndex) const = 0;
187+
virtual std::vector<float> getVector(const sql::SQLString &columnLabel) const = 0;
188188
};
189189

190190
} /* namespace sql */

jdbc/driver/mysql_prepared_statement.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ class MySQL_Prepared_Statement : public sql::PreparedStatement
194194
void setString(unsigned int parameterIndex,
195195
const sql::SQLString &value) override;
196196

197-
void setVector(unsigned int parameterIndex,
198-
const std::vector<float> &vec) override;
199-
200197
void setQueryTimeout(unsigned int seconds) override;
201198

202199
sql::PreparedStatement *setResultSetType(
@@ -225,6 +222,12 @@ class MySQL_Prepared_Statement : public sql::PreparedStatement
225222

226223
// For internal use
227224
sql::ResultSet *_getResultSet();
225+
226+
public:
227+
228+
void setVector(unsigned int parameterIndex,
229+
const std::vector<float> &vec) override;
230+
228231
};
229232

230233
} /* namespace mysql */

jdbc/driver/mysql_ps_resultset.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ class MySQL_Prepared_ResultSet : public sql::ResultSet
158158
SQLString getString(uint32_t columnIndex) const;
159159
SQLString getString(const sql::SQLString &columnLabel) const;
160160

161-
std::vector<float> getVector(uint32_t columnIndex) const;
162-
std::vector<float> getVector(const sql::SQLString &columnLabel) const;
163-
164161
sql::ResultSet::enum_type getType() const;
165162

166163
void getWarnings();
@@ -206,6 +203,9 @@ class MySQL_Prepared_ResultSet : public sql::ResultSet
206203
void setFetchSize(size_t rows);
207204

208205
bool wasNull() const;
206+
207+
std::vector<float> getVector(uint32_t columnIndex) const;
208+
std::vector<float> getVector(const sql::SQLString &columnLabel) const;
209209
};
210210

211211
} /* namespace mysql*/

jdbc/driver/mysql_resultset.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ class MySQL_ResultSet : public sql::ResultSet
157157
SQLString getString(uint32_t columnIndex) const;
158158
SQLString getString(const sql::SQLString &columnLabel) const;
159159

160-
std::vector<float> getVector(uint32_t columnIndex) const;
161-
std::vector<float> getVector(const sql::SQLString &columnLabel) const;
162-
163160
sql::ResultSet::enum_type getType() const;
164161

165162
void getWarnings();
@@ -205,10 +202,17 @@ class MySQL_ResultSet : public sql::ResultSet
205202
void setFetchSize(size_t rows);
206203

207204
bool wasNull() const;
205+
208206
private:
209207
/* Prevent use of these */
210208
MySQL_ResultSet(const MySQL_ResultSet &);
211209
void operator=(MySQL_ResultSet &);
210+
211+
public:
212+
213+
std::vector<float> getVector(uint32_t columnIndex) const;
214+
std::vector<float> getVector(const sql::SQLString &columnLabel) const;
215+
212216
};
213217

214218
} /* namespace mysql */

0 commit comments

Comments
 (0)