From 4469ae60d0420f5faa17fa987bc2d5008dd8a12e Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Fri, 11 Dec 2015 18:02:12 +0200 Subject: [PATCH] Use proper conversions in PGSql backend --- modules/gpgsqlbackend/spgsql.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/gpgsqlbackend/spgsql.cc b/modules/gpgsqlbackend/spgsql.cc index 4b4947573..44e08da1d 100644 --- a/modules/gpgsqlbackend/spgsql.cc +++ b/modules/gpgsqlbackend/spgsql.cc @@ -25,7 +25,7 @@ public: // prepare a statement gettimeofday(&tv,NULL); - this->d_stmt = string("stmt") + boost::lexical_cast(tv.tv_sec) + boost::lexical_cast(tv.tv_usec); + this->d_stmt = string("stmt") + std::to_string(tv.tv_sec) + std::to_string(tv.tv_usec); d_nparams = nparams; @@ -45,12 +45,12 @@ public: } SSqlStatement* bind(const string& name, bool value) { return bind(name, string(value ? "t" : "f")); } - SSqlStatement* bind(const string& name, int value) { return bind(name, boost::lexical_cast(value)); } - SSqlStatement* bind(const string& name, uint32_t value) { return bind(name, boost::lexical_cast(value)); } - SSqlStatement* bind(const string& name, long value) { return bind(name, boost::lexical_cast(value)); } - SSqlStatement* bind(const string& name, unsigned long value) { return bind(name, boost::lexical_cast(value)); } - SSqlStatement* bind(const string& name, long long value) { return bind(name, boost::lexical_cast(value)); } - SSqlStatement* bind(const string& name, unsigned long long value) { return bind(name, boost::lexical_cast(value)); } + SSqlStatement* bind(const string& name, int value) { return bind(name, std::to_string(value)); } + SSqlStatement* bind(const string& name, uint32_t value) { return bind(name, std::to_string(value)); } + SSqlStatement* bind(const string& name, long value) { return bind(name, std::to_string(value)); } + SSqlStatement* bind(const string& name, unsigned long value) { return bind(name, std::to_string(value)); } + SSqlStatement* bind(const string& name, long long value) { return bind(name, std::to_string(value)); } + SSqlStatement* bind(const string& name, unsigned long long value) { return bind(name, std::to_string(value)); } SSqlStatement* bind(const string& name, const std::string& value) { allocate(); if (d_paridx>=d_nparams) -- 2.40.0