diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-05-02 18:41:53 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-05-02 18:41:53 +0100 |
commit | b0cf524f61e5d814fdac4018c3ff4946b9600702 (patch) | |
tree | daafd50182ad0e6cc5dd045d9c5635a74462eaff /libpqpp/command.cpp | |
parent | Centralize all the column reference storage logic (diff) | |
download | libdbpp-postgresql-b0cf524f61e5d814fdac4018c3ff4946b9600702.tar.bz2 libdbpp-postgresql-b0cf524f61e5d814fdac4018c3ff4946b9600702.tar.xz libdbpp-postgresql-b0cf524f61e5d814fdac4018c3ff4946b9600702.zip |
Add support for RDBMS boolean/bit types
Diffstat (limited to 'libpqpp/command.cpp')
-rw-r--r-- | libpqpp/command.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); |