From: Razvan Becheriu Date: Tue, 25 Jan 2022 13:03:39 +0000 (+0200) Subject: [#2284] more formatting X-Git-Tag: Kea-2.1.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6cf0137bb3e490eac9415e0045796476ca1a3c5;p=thirdparty%2Fkea.git [#2284] more formatting --- diff --git a/src/lib/pgsql/pgsql_exchange.h b/src/lib/pgsql/pgsql_exchange.h index c426d3badd..0b0383610f 100644 --- a/src/lib/pgsql/pgsql_exchange.h +++ b/src/lib/pgsql/pgsql_exchange.h @@ -151,23 +151,28 @@ typedef boost::shared_ptr PgSqlResultPtr; typedef boost::shared_ptr ConstStringPtr; struct PsqlBindArray { + /// @brief Constructor. PsqlBindArray() : values_(0), lengths_(0), formats_(0) {} /// @brief Vector of pointers to the data values. - std::vector values_; + std::vector values_; + /// @brief Vector of data lengths for each value. std::vector lengths_; + /// @brief Vector of "format" for each value. A value of 0 means the /// value is text, 1 means the value is binary. std::vector formats_; /// @brief Format value for text data. static const int TEXT_FMT; + /// @brief Format value for binary data. static const int BINARY_FMT; /// @brief Constant string passed to DB for boolean true values. static const char* TRUE_STR; + /// @brief Constant string passed to DB for boolean false values. static const char* FALSE_STR; @@ -181,7 +186,6 @@ struct PsqlBindArray { /// @return Returns true if there are no entries in the array, false /// otherwise. bool empty() const { - return (values_.empty()); } @@ -476,13 +480,12 @@ struct PsqlBindArray { isc_throw(OutOfRange, "Invalid index " << index << ", the formats_ array has " << formats_.size() << " element(s)"); } - return formats_.at(index); + return (formats_.at(index)); } private: /// @brief vector of strings which supplied the values std::vector bound_strs_; - }; /// @brief Defines a smart pointer to PsqlBindArray @@ -756,7 +759,7 @@ public: protected: /// @brief Stores text labels for columns, currently only used for /// logging and errors. - std::vectorcolumns_; + std::vector columns_; }; } // end of isc::db namespace