aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/QueryResult.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-09-19 15:25:50 +0200
committerMachiavelli <none@none>2010-09-19 15:25:50 +0200
commit22571e9443ca3d1211f1f9888c67156481916d8b (patch)
treeda772e3f7dd6c8c4381adf1bad8fc7879440818d /src/server/shared/Database/QueryResult.cpp
parentb50c931d6eddb9493c494bc09900c79893b0bf1a (diff)
Core/DBLayer:
- Allow storing floats in prepared statements explicitly (previously would be casted to double) - Add GetBool ¨wrapper/hack¨ to PreparedResultset class. --HG-- branch : trunk
Diffstat (limited to 'src/server/shared/Database/QueryResult.cpp')
-rw-r--r--src/server/shared/Database/QueryResult.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index 61f41e75587..283734b80b7 100644
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
@@ -185,6 +185,12 @@ void ResultBind::CleanUp()
delete[] m_rBind;
}
+bool PreparedResultSet::GetBool(uint32 index)
+{
+ // TODO: Perhaps start storing data in genuine bool formats in tables
+ return GetUInt8(index) == 1 ? true : false;
+}
+
uint8 PreparedResultSet::GetUInt8(uint32 index)
{
if (!CheckFieldIndex(index))