diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-12-09 15:47:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-12-09 15:47:34 +0300 |
commit | d259750511b3c2aaeace49f8ccb1d7f3ad561452 (patch) | |
tree | 9a98e1a2a66fc8a25dc1b58efd2e7e0e77201914 /libbrep/common.hxx | |
parent | 4bc9390c48cee736917ead5d20aa216fe10bae47 (diff) |
Prepare for supporting multiple ids in requirement alternative
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r-- | libbrep/common.hxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 98fc4e7..b9b6928 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -373,13 +373,28 @@ namespace brep // requirements // + // Note that this is a 2-level nested container (see package.hxx for + // details). + // + using bpkg::requirement_alternative; using bpkg::requirement_alternatives; using requirements = vector<requirement_alternatives>; + #pragma db value(requirement_alternative) definition #pragma db value(requirement_alternatives) definition - using requirement_key = odb::nested_key<requirement_alternatives>; - using requirement_alternatives_map = std::map<requirement_key, string>; + using requirement_alternative_key = + odb::nested_key<requirement_alternatives>; + + using requirement_alternatives_map = + std::map<requirement_alternative_key, requirement_alternative>; + + #pragma db value(requirement_alternative_key) + + using requirement_key = odb::nested2_key<requirement_alternatives>; + + using requirement_alternative_requirements_map = + std::map<requirement_key, string>; #pragma db value(requirement_key) |