Made sure that the postgres module compiles

This commit is contained in:
Dr. Patrick Urbanke
2025-04-19 10:30:27 +02:00
parent c8ce5f682f
commit c63fd12e7b
3 changed files with 9 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ target_include_directories(
$<INSTALL_INTERFACE:include>)
if (SQLGEN_POSTGRES)
list(APPEND SQLGEN_SOURCES src/sqlgen_postgres.cpp)
if (NOT TARGET PostgreSQL)
find_package(PostgreSQL REQUIRED)
endif()

View File

@@ -46,8 +46,12 @@ class Connection : public sqlgen::Connection {
const std::vector<std::vector<std::optional<std::string>>>& _data) final;
private:
static rfl::Result<Ref<sqlgen::Connection>> make_conn(
const std::string& _conn_str);
static ConnPtr make_conn(const std::string& _conn_str);
private:
ConnPtr conn_;
Credentials credentials_;
};
} // namespace sqlgen::postgres

2
src/sqlgen_postgres.cpp Normal file
View File

@@ -0,0 +1,2 @@
#include "sqlgen/postgres/Connection.cpp"
#include "sqlgen/postgres/Iterator.cpp"