diff options
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r-- | libbrep/common.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 73353c7..0899dc9 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -9,6 +9,7 @@ #include <type_traits> // static_assert #include <odb/query.hxx> +#include <odb/nested-container.hxx> #include <libbpkg/package-name.hxx> @@ -355,6 +356,33 @@ namespace brep ? brep::to_unbuildable_reason (*(?)) \ : brep::optional_unbuildable_reason ()) \ + // version_constraint + // + using bpkg::version_constraint; + + #pragma db value(version_constraint) definition + + // test_dependency_type + // + using bpkg::test_dependency_type; + using bpkg::to_test_dependency_type; + + #pragma db map type(test_dependency_type) as(string) \ + to(to_string (?)) \ + from(brep::to_test_dependency_type (?)) + + // requirements + // + using bpkg::requirement_alternatives; + using requirements = vector<requirement_alternatives>; + + #pragma db value(requirement_alternatives) definition + + using requirement_key = odb::nested_key<requirement_alternatives>; + using requirement_alternatives_map = std::map<requirement_key, string>; + + #pragma db value(requirement_key) + // Version comparison operators. // // They allow comparing objects that have epoch, canonical_upstream, |