relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
sql_utils.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5// Forward declarations
6namespace relx::result {
7class ResultSet;
8}
9
10// Forward declare PostgreSQL types to avoid libpq header dependency
11struct pg_result;
12using PGresult = pg_result;
13
15
24std::string convert_placeholders_to_postgresql(const std::string& sql);
25
29std::string isolation_level_to_postgresql_string(int isolation_level);
30
35result::ResultSet process_postgresql_result(PGresult* pg_result, bool convert_bytea = false);
36
37} // namespace relx::connection::sql_utils
Represents the result set from a database query.
Definition result.hpp:608
std::string convert_placeholders_to_postgresql(const std::string &sql)
Convert ? placeholders to PostgreSQL $1, $2, etc.
std::string isolation_level_to_postgresql_string(int isolation_level)
Convert IsolationLevel enum to PostgreSQL isolation level string.
result::ResultSet process_postgresql_result(PGresult *pg_result, bool convert_bytea=false)
Process PostgreSQL result into relx ResultSet format.
pg_result PGresult