diff options
author | Machiavelli <none@none> | 2010-09-19 15:25:50 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-09-19 15:25:50 +0200 |
commit | 22571e9443ca3d1211f1f9888c67156481916d8b (patch) | |
tree | da772e3f7dd6c8c4381adf1bad8fc7879440818d /src/server/shared/Database/QueryResult.cpp | |
parent | b50c931d6eddb9493c494bc09900c79893b0bf1a (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.cpp | 6 |
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)) |