32 using connection_type = sqlgen::postgres::Connection;
33 using connection_pool_type = sqlgen::Result<
34 sqlgen::ConnectionPool<connection_type>>;
35 using single_connection_type = sqlgen::Result<
36 rfl::Ref<connection_type>>;
38 explicit context(connection_pool_type connection_pool,
39 single_connection_type single_connection,
40 sqlgen::postgres::Credentials credentials)
41 : connection_pool_(std::move(connection_pool)),
42 single_connection_(std::move(single_connection)),
43 credentials_(std::move(credentials)) {}
45 connection_pool_type connection_pool() {
return connection_pool_; }
46 single_connection_type single_connection() {
return single_connection_; }
47 const sqlgen::postgres::Credentials& credentials()
const {
return credentials_; }
50 connection_pool_type connection_pool_;
51 single_connection_type single_connection_;
52 const sqlgen::postgres::Credentials credentials_;