diff options
Diffstat (limited to 'libpqpp/pq-column.h')
-rw-r--r-- | libpqpp/pq-column.h | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/libpqpp/pq-column.h b/libpqpp/pq-column.h index b0a568d..e5bb9d2 100644 --- a/libpqpp/pq-column.h +++ b/libpqpp/pq-column.h @@ -7,27 +7,34 @@ namespace PQ { class SelectBase; class Column : public DB::Column { - public: - Column(const SelectBase *, unsigned int field); - ~Column(); + public: + Column(const SelectBase *, unsigned int field); + ~Column(); - [[nodiscard]] bool isNull() const override; - void apply(DB::HandleField &) const override; + [[nodiscard]] bool isNull() const override; + void apply(DB::HandleField &) const override; - protected: - template<typename T> - inline T valueAs() const { return *(T*)(value()); } - template<typename T> - inline T * valueAsPtr() const { return (T*)(value()); } - const char * value() const; - std::size_t length() const; + protected: + template<typename T> + inline T + valueAs() const + { + return *(T *)(value()); + } + template<typename T> + inline T * + valueAsPtr() const + { + return (T *)(value()); + } + const char * value() const; + std::size_t length() const; - const SelectBase * sc; - const Oid oid; - // Buffer for PQunescapeBytea - mutable unsigned char * buf; + const SelectBase * sc; + const Oid oid; + // Buffer for PQunescapeBytea + mutable unsigned char * buf; }; } #endif - |