|
ORE Studio 0.0.4
|
Service for managing feature flags. More...
#include <feature_flags_service.hpp>

Public Member Functions | |
| feature_flags_service (database::context ctx) | |
| Constructs a feature_flags_service. | |
| std::optional< domain::feature_flags > | get_feature_flag (const std::string &name) |
| Retrieves a single feature flag by name. | |
| std::vector< domain::feature_flags > | get_all_feature_flags () |
| Retrieves all currently active feature flags. | |
| void | save_feature_flag (const domain::feature_flags &flag) |
| Saves a feature flag. | |
| void | delete_feature_flag (const std::string &name) |
| Logically removes a feature flag. | |
Service for managing feature flags.
Provides high-level operations for retrieving and modifying feature flags. Encapsulates the underlying repository and handles the bitemporal update logic.
|
explicit |
Constructs a feature_flags_service.
| ctx | The database context to be used by the repository. |
| std::optional< domain::feature_flags > get_feature_flag | ( | const std::string & | name | ) |
Retrieves a single feature flag by name.
| name | The name of the feature flag to retrieve. |

| std::vector< domain::feature_flags > get_all_feature_flags | ( | ) |
Retrieves all currently active feature flags.
| void save_feature_flag | ( | const domain::feature_flags & | flag | ) |
Saves a feature flag.
Handles the bitemporal update logic: if the flag already exists, it is logically removed (closed) before the new version is written. This ensures a clean update of the feature flag.
| flag | The feature flag to save. |

| void delete_feature_flag | ( | const std::string & | name | ) |
Logically removes a feature flag.
Closes the validity period of the feature flag, effectively deleting it from the current view while preserving history.
| name | The name of the feature flag to delete. |