Make the database model support the float type

This commit is contained in:
antao 2018-11-20 11:20:57 +08:00
parent 9ee0ef6cc8
commit 972b0bf600
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include <map>
#include <vector>
#include <memory>
#include <sstream>
namespace drogon
{
@ -323,6 +324,14 @@ class SqlBinder
_format.push_back(1);
return *this;
}
self &operator<<(float f)
{
return operator<<(std::to_string(f));
}
self &operator<<(double f)
{
return operator<<(std::to_string(f));
}
self &operator<<(std::nullptr_t nullp)
{
_paraNum++;