diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:04 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:04 +0000 |
commit | 22e0839fd6912b888b7c3c790573aef1f5df3936 (patch) | |
tree | 5e88e4de68024326b2c59b163dfc1b74a5d4c7f3 /libodbcpp/odbc-command.h | |
parent | Fixes for tidy (diff) | |
download | libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.bz2 libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.xz libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.zip |
Clang format
Diffstat (limited to 'libodbcpp/odbc-command.h')
-rw-r--r-- | libodbcpp/odbc-command.h | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/libodbcpp/odbc-command.h b/libodbcpp/odbc-command.h index ceba2dc..b0aa3fa 100644 --- a/libodbcpp/odbc-command.h +++ b/libodbcpp/odbc-command.h @@ -1,54 +1,52 @@ #ifndef ODBC_COMMAND_H #define ODBC_COMMAND_H -#include <command.h> -#include <vector> #include "odbc-connection.h" #include "odbc-param_fwd.h" +#include <command.h> #include <glibmm/ustring.h> +#include <vector> namespace ODBC { using ParamPtr = std::unique_ptr<Param>; class Command : public virtual DB::Command { - using Params = std::vector<ParamPtr>; - public: - Command(const Connection &, const std::string & sql); + using Params = std::vector<ParamPtr>; + + public: + Command(const Connection &, const std::string & sql); - void bindParamI(unsigned int i, int val) override; - void bindParamI(unsigned int i, long val) override; - void bindParamI(unsigned int i, long long val) override; - void bindParamI(unsigned int i, unsigned int val) override; - void bindParamI(unsigned int i, unsigned long int val) override; - void bindParamI(unsigned int i, unsigned long long int val) override; + void bindParamI(unsigned int i, int val) override; + void bindParamI(unsigned int i, long val) override; + void bindParamI(unsigned int i, long long val) override; + void bindParamI(unsigned int i, unsigned int val) override; + void bindParamI(unsigned int i, unsigned long int val) override; + void bindParamI(unsigned int i, unsigned long long int val) override; - void bindParamB(unsigned int i, bool val) override; + void bindParamB(unsigned int i, bool val) override; - void bindParamF(unsigned int i, double val) override; - void bindParamF(unsigned int i, float val) override; + void bindParamF(unsigned int i, double val) override; + void bindParamF(unsigned int i, float val) override; - void bindParamS(unsigned int i, const Glib::ustring &) override; - void bindParamS(unsigned int i, const std::string_view &) override; + void bindParamS(unsigned int i, const Glib::ustring &) override; + void bindParamS(unsigned int i, const std::string_view &) override; - void bindParamT(unsigned int i, const boost::posix_time::time_duration &) override; - void bindParamT(unsigned int i, const boost::posix_time::ptime &) override; + void bindParamT(unsigned int i, const boost::posix_time::time_duration &) override; + void bindParamT(unsigned int i, const boost::posix_time::ptime &) override; - void bindNull(unsigned int i) override; + void bindNull(unsigned int i) override; - protected: - friend class Param; - friend class Column; - SQLHSTMT hStmt; - const Connection& connection; + protected: + friend class Param; + friend class Column; + SQLHSTMT hStmt; + const Connection & connection; - private: - Params params; + private: + Params params; - template <class ParamType> - ParamType * - makeParam(unsigned int idx); + template<class ParamType> ParamType * makeParam(unsigned int idx); }; } #endif - |