Date: Friday, March 23, 2007 @ 18:41:50
Author: gilles
Path: /cvsroot/carob/carob/src
Modified: DriverResultSet.cpp (1.64 -> 1.65)
Optimization for getAsString() on string objects => this is non-negligeable
especially when used by libmysequoia (which does only getAsString()
---------------------+
DriverResultSet.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: carob/src/DriverResultSet.cpp
diff -u carob/src/DriverResultSet.cpp:1.64 carob/src/DriverResultSet.cpp:1.65
--- carob/src/DriverResultSet.cpp:1.64 Thu Feb 15 18:40:20 2007
+++ carob/src/DriverResultSet.cpp Fri Mar 23 18:41:50 2007
@@ -280,15 +280,15 @@
+ L" column " + toUserString(columnIndex) + L" is NULL"));
}
+ // save allocs and time for native type
+ if (columnTypeTags[columnIndex - 1] == TT_STRING)
+ return *(static_cast<wstring*>((*data[currentRow])[columnIndex -
1].as_other));
+
std::wostringstream buffer;
buffer.imbue(loc);
-
// big switch on column data type
switch (columnTypeTags[columnIndex - 1])
{
- case TT_STRING:
- buffer << *(static_cast<wstring*>((*data[currentRow])[columnIndex -
1].as_other));
- break;
case TT_BIGDECIMAL:
{
BigDecimal* bd =
static_cast<BigDecimal*>((*data[currentRow])[columnIndex - 1].as_other);
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits