From 3bfa3dafe335479aade55507719071f7dceb0d8c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 18 Nov 2020 16:55:18 +0000 Subject: Clang format --- libpqpp/pq-command.h | 81 +++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 42 deletions(-) (limited to 'libpqpp/pq-command.h') diff --git a/libpqpp/pq-command.h b/libpqpp/pq-command.h index 101afd8..839c991 100644 --- a/libpqpp/pq-command.h +++ b/libpqpp/pq-command.h @@ -1,72 +1,69 @@ #ifndef PQ_COMMAND_H #define PQ_COMMAND_H +#include "pq-connection.h" #include #include -#include #include +#include #include -#include "pq-connection.h" namespace PQ { class Connection; class DLL_PUBLIC CommandOptions : public DB::CommandOptions { - public: - CommandOptions(std::size_t, const DB::CommandOptionsMap &); - explicit CommandOptions(std::size_t hash, - unsigned int fetchTuples = 35, - bool useCursor = true, - bool fetchBinary = false); + public: + CommandOptions(std::size_t, const DB::CommandOptionsMap &); + explicit CommandOptions( + std::size_t hash, unsigned int fetchTuples = 35, bool useCursor = true, bool fetchBinary = false); - unsigned int fetchTuples; - bool useCursor; - bool fetchBinary; + unsigned int fetchTuples; + bool useCursor; + bool fetchBinary; }; using CommandOptionsPtr = std::shared_ptr; using CommandOptionsCPtr = std::shared_ptr; class Command : public virtual DB::Command { - public: - Command(Connection *, const std::string & sql, const DB::CommandOptionsCPtr &); + public: + Command(Connection *, const std::string & sql, const DB::CommandOptionsCPtr &); + + void bindParamI(unsigned int, int) override; + void bindParamI(unsigned int, long int) override; + void bindParamI(unsigned int, long long int) override; + void bindParamI(unsigned int, unsigned int) override; + void bindParamI(unsigned int, long unsigned int) override; + void bindParamI(unsigned int, long long unsigned int) override; - void bindParamI(unsigned int, int) override; - void bindParamI(unsigned int, long int) override; - void bindParamI(unsigned int, long long int) override; - void bindParamI(unsigned int, unsigned int) override; - void bindParamI(unsigned int, long unsigned int) override; - void bindParamI(unsigned int, long long unsigned int) override; + void bindParamB(unsigned int, bool) override; - void bindParamB(unsigned int, bool) override; + void bindParamF(unsigned int, double) override; + void bindParamF(unsigned int, float) override; - void bindParamF(unsigned int, double) override; - void bindParamF(unsigned int, float) override; + void bindParamS(unsigned int, const Glib::ustring &) override; + void bindParamS(unsigned int, const std::string_view &) override; - void bindParamS(unsigned int, const Glib::ustring&) override; - void bindParamS(unsigned int, const std::string_view&) override; + void bindParamT(unsigned int, const boost::posix_time::time_duration &) override; + void bindParamT(unsigned int, const boost::posix_time::ptime &) override; - void bindParamT(unsigned int, const boost::posix_time::time_duration &) override; - void bindParamT(unsigned int, const boost::posix_time::ptime &) override; + void bindParamBLOB(unsigned int, const DB::Blob &) override; - void bindParamBLOB(unsigned int, const DB::Blob &) override; + void bindNull(unsigned int) override; - void bindNull(unsigned int) override; - protected: - void prepareSql(std::stringstream & psql, const std::string & sql) const; - Connection::StatementHash hash; - const std::string stmntName; - Connection * const c; + protected: + void prepareSql(std::stringstream & psql, const std::string & sql) const; + Connection::StatementHash hash; + const std::string stmntName; + Connection * const c; - void paramsAtLeast(unsigned int); - template - void paramSet(unsigned int, const T & ... t); - void paramSet(unsigned int, const std::string_view &); - std::vector values; - std::vector lengths; - std::vector formats; - std::vector> bufs; + void paramsAtLeast(unsigned int); + template void paramSet(unsigned int, const T &... t); + void paramSet(unsigned int, const std::string_view &); + std::vector values; + std::vector lengths; + std::vector formats; + std::vector> bufs; }; } #endif - -- cgit v1.2.3