20#ifndef ORES_CONNECTIONS_REPOSITORY_CONNECTION_REPOSITORY_HPP
21#define ORES_CONNECTIONS_REPOSITORY_CONNECTION_REPOSITORY_HPP
25#include <boost/uuid/uuid.hpp>
26#include "ores.connections/domain/connection.hpp"
27#include "ores.connections/repository/sqlite_context.hpp"
29namespace ores::connections::repository {
31class connection_repository final {
33 explicit connection_repository(sqlite_context& ctx);
35 void write(
const domain::connection& conn);
36 void write(
const std::vector<domain::connection>& conns);
37 std::vector<domain::connection> read_all();
38 std::optional<domain::connection> read_by_id(
const boost::uuids::uuid&
id);
39 std::vector<domain::connection> read_by_folder(
40 const std::optional<boost::uuids::uuid>& folder_id);
41 void remove(
const boost::uuids::uuid&
id);