ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
feature_flags_repository Class Reference

Reads and writes feature flags from data storage. More...

#include <feature_flags_repository.hpp>

Collaboration diagram for feature_flags_repository:
Collaboration graph

Public Types

using context = ores::database::context
 

Public Member Functions

 feature_flags_repository (context ctx)
 
std::string sql ()
 Returns the SQL created by sqlgen to construct the table.
 
void remove (const std::string &name)
 Deletes a feature flag by closing its temporal validity.
 
void write (const domain::feature_flags &flag)
 Writes feature flags to database. Expects the feature flag set to have unique names.
 
void write (const std::vector< domain::feature_flags > &flags)
 
std::vector< domain::feature_flagsread_latest ()
 Reads latest feature flags, possibly filtered by name.
 
std::vector< domain::feature_flagsread_latest (const std::string &name)
 
std::vector< domain::feature_flagsread_all ()
 Reads all feature flags, possibly filtered by name.
 
std::vector< domain::feature_flagsread_all (const std::string &name)
 

Detailed Description

Reads and writes feature flags from data storage.

Member Function Documentation

◆ remove()

void remove ( const std::string &  name)

Deletes a feature flag by closing its temporal validity.

Sets the valid_to timestamp to now, effectively "deleting" the feature flag from the current point in time onwards while preserving history.

Here is the caller graph for this function: