Date: Tuesday, January 17, 2006 @ 16:19:15
Author: marc
Path: /cvsroot/carob/odbsequoia/src
Modified: abstract_item.hpp (1.8 -> 1.9) stmt.cpp (1.8 -> 1.9)
Made diag_records private. Made owner public (since it is const now).
-------------------+
abstract_item.hpp | 10 +++++++---
stmt.cpp | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
Index: odbsequoia/src/abstract_item.hpp
diff -u odbsequoia/src/abstract_item.hpp:1.8
odbsequoia/src/abstract_item.hpp:1.9
--- odbsequoia/src/abstract_item.hpp:1.8 Tue Jan 17 14:23:04 2006
+++ odbsequoia/src/abstract_item.hpp Tue Jan 17 16:19:15 2006
@@ -59,6 +59,11 @@
virtual ~ODBCItem() { };
+ const ODBCItem& owner;
+
+ void clear_diags() { diag_records.clear(); };
+ void push_diag(const DiagRecord& diag) { diag_records.push_back(diag); };
+
protected:
virtual SQLRETURN
get_header_diag_fieldw(SQLSMALLINT DiagIdentifier,
@@ -71,13 +76,12 @@
SQLPOINTER DiagInfoPtr,
SQLSMALLINT BufferLength, SQLSMALLINT *
StringLengthPtr)
const;
-
+private:
std::vector<DiagRecord> diag_records;
- const ODBCItem& owner;
};
-}
+} // namespace ODBSeqNS
Index: odbsequoia/src/stmt.cpp
diff -u odbsequoia/src/stmt.cpp:1.8 odbsequoia/src/stmt.cpp:1.9
--- odbsequoia/src/stmt.cpp:1.8 Tue Jan 17 16:01:45 2006
+++ odbsequoia/src/stmt.cpp Tue Jan 17 16:19:15 2006
@@ -39,7 +39,7 @@
SQLRETURN
ODBCStatement::exec_directw(const SQLWCHAR *StatementText, SQLINTEGER
TextLength)
{
- diag_records.clear();
+ this->clear_diags();
try
{
const std::wstring wstext = fromSQLW(StatementText, TextLength);
@@ -55,7 +55,7 @@
DiagRecord diag(ce.getSQLState(),
ce.getErrorCode(),
ce.description());
- diag_records.push_back(diag);
+ this->push_diag(diag);
return SQL_ERROR;
}
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits