From fa16a96443f4b3a7b62ca05338e88d0ce13a849f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Oct 2023 18:59:35 +0100 Subject: Move valueAs to BinaryColumn, implement with std::byteswap Removes the need to cast to/from BSD endian supported types. --- libpqpp/pq-binarycolumn.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpqpp/pq-binarycolumn.h') diff --git a/libpqpp/pq-binarycolumn.h b/libpqpp/pq-binarycolumn.h index e2a8044..e44d7e2 100644 --- a/libpqpp/pq-binarycolumn.h +++ b/libpqpp/pq-binarycolumn.h @@ -15,6 +15,9 @@ namespace PQ { BinaryColumn(const SelectBase *, unsigned int field); void apply(DB::HandleField &) const override; + + private: + template [[nodiscard]] inline T valueAs() const; }; } -- cgit v1.2.3