summaryrefslogtreecommitdiff
path: root/libodbcpp/odbc-column.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-11-18 16:55:04 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2020-11-18 16:55:04 +0000
commit22e0839fd6912b888b7c3c790573aef1f5df3936 (patch)
tree5e88e4de68024326b2c59b163dfc1b74a5d4c7f3 /libodbcpp/odbc-column.cpp
parentFixes for tidy (diff)
downloadlibdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.bz2
libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.xz
libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.zip
Clang format
Diffstat (limited to 'libodbcpp/odbc-column.cpp')
-rw-r--r--libodbcpp/odbc-column.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/libodbcpp/odbc-column.cpp b/libodbcpp/odbc-column.cpp
index 2a25f9b..3d968c2 100644
--- a/libodbcpp/odbc-column.cpp
+++ b/libodbcpp/odbc-column.cpp
@@ -1,14 +1,12 @@
-#include <sqlext.h>
-#include <cstdio>
-#include <cstdlib>
#include "odbc-column.h"
#include "odbc-command.h"
-#include "odbc-selectcommand.h"
#include "odbc-error.h"
+#include "odbc-selectcommand.h"
+#include <cstdio>
+#include <cstdlib>
+#include <sqlext.h>
-ODBC::Column::Column(SelectCommand * sc, const Glib::ustring & s, unsigned int i) :
- DB::Column(s, i),
- selectCmd(sc)
+ODBC::Column::Column(SelectCommand * sc, const Glib::ustring & s, unsigned int i) : DB::Column(s, i), selectCmd(sc)
{
bindLen = 0;
}
@@ -51,14 +49,12 @@ ODBC::Column::bind()
ODBC::TimeStampColumn::operator boost::posix_time::ptime() const
{
- return boost::posix_time::ptime(
- boost::gregorian::date(data.year, data.month, data.day),
- boost::posix_time::time_duration(data.hour, data.minute, data.second, data.fraction));
+ return boost::posix_time::ptime(boost::gregorian::date(data.year, data.month, data.day),
+ boost::posix_time::time_duration(data.hour, data.minute, data.second, data.fraction));
}
ODBC::IntervalColumn::operator boost::posix_time::time_duration() const
{
- auto dur = boost::posix_time::time_duration(
- (24 * data.intval.day_second.day) + data.intval.day_second.hour,
+ auto dur = boost::posix_time::time_duration((24 * data.intval.day_second.day) + data.intval.day_second.hour,
data.intval.day_second.minute, data.intval.day_second.second, data.intval.day_second.fraction);
return (data.interval_sign ? -dur : dur);
}
@@ -84,7 +80,7 @@ ODBC::CharArrayColumn::apply(DB::HandleField & h) const
if (isNull()) {
return h.null();
}
- h.string({ data.data(), (std::size_t)bindLen });
+ h.string({data.data(), (std::size_t)bindLen});
}
void
ODBC::TimeStampColumn::apply(DB::HandleField & h) const