From 03058a043ac50ec985b08e374e6e116774a5b970 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 30 Mar 2021 20:24:41 +0100 Subject: Convert SQL::Field to be a typedef of optional. --- src/modules/extra/m_pgsql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/extra/m_pgsql.cpp') diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 0722ad9ae..522ca205d 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -159,9 +159,9 @@ class PgSQLresult : public SQL::Result { char* v = PQgetvalue(res, row, column); if (!v || PQgetisnull(res, row, column)) - return SQL::Field(); + return std::nullopt; - return SQL::Field(std::string(v, PQgetlength(res, row, column))); + return std::string(v, PQgetlength(res, row, column)); } bool GetRow(SQL::Row& result) override -- cgit v1.3.1-10-gc9f91