From fea1965942d2b48f4c0f6c50de3113cf02d6e33e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 2 May 2015 18:41:53 +0100 Subject: Add support for RDBMS boolean/bit types --- libpqpp/command.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libpqpp/command.cpp') diff --git a/libpqpp/command.cpp b/libpqpp/command.cpp index abd37e6..ba12574 100644 --- a/libpqpp/command.cpp +++ b/libpqpp/command.cpp @@ -81,6 +81,13 @@ PQ::Command::bindParamI(unsigned int n, long long unsigned int v) formats[n] = 0; } void +PQ::Command::bindParamB(unsigned int n, bool v) +{ + paramsAtLeast(n); + lengths[n] = asprintf(&values[n], "%s", v ? "true" : "false"); + formats[n] = 0; +} +void PQ::Command::bindParamF(unsigned int n, double v) { paramsAtLeast(n); -- cgit v1.2.3