From 8a9378134b8cc3f48c07ba47e692934401c51715 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Oct 2023 14:26:11 +0100 Subject: Use proper defines for column types --- libpqpp/pq-binarycolumn.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'libpqpp/pq-binarycolumn.cpp') diff --git a/libpqpp/pq-binarycolumn.cpp b/libpqpp/pq-binarycolumn.cpp index 0a488f7..514a145 100644 --- a/libpqpp/pq-binarycolumn.cpp +++ b/libpqpp/pq-binarycolumn.cpp @@ -5,6 +5,7 @@ #include #include #include +#include PQ::BinaryColumn::BinaryColumn(const PQ::SelectBase * s, unsigned int f) : PQ::Column(s, f) { } @@ -16,25 +17,25 @@ PQ::BinaryColumn::apply(DB::HandleField & h) const return; } switch (oid) { - case 18: // CHAROID: - case 1043: // VARCHAROID: - case 25: // TEXTOID: - case 142: // XMLOID: + case CHAROID: + case VARCHAROID: + case TEXTOID: + case XMLOID: h.string({value(), length()}); break; - case 16: // BOOLOID: + case BOOLOID: h.boolean(valueAs()); break; - case 21: // INT2OID: + case INT2OID: h.integer(static_cast(be16toh(valueAs()))); break; - case 23: // INT4OID: + case INT4OID: h.integer(static_cast(be32toh(valueAs()))); break; - case 20: // INT8OID: + case INT8OID: h.integer(static_cast(be64toh(valueAs()))); break; - case 17: // BYTEAOID + case BYTEAOID: h.blob(DB::Blob(value(), length())); break; default: -- cgit v1.2.3