aboutsummaryrefslogtreecommitdiff
path: root/libbrep/build-package.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-03-11 21:23:21 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-03-21 18:00:39 +0300
commit7fa57f8522ed7741c00ed3cd64cf956716aebd2c (patch)
tree96a6a22ac86707faefc069bbd0edcbc9431414b0 /libbrep/build-package.hxx
parent3b53b72fd5691fcb9e684b902efcdd4c36a2da49 (diff)
Add support for build auxiliary machines/configurations
Diffstat (limited to 'libbrep/build-package.hxx')
-rw-r--r--libbrep/build-package.hxx24
1 files changed, 20 insertions, 4 deletions
diff --git a/libbrep/build-package.hxx b/libbrep/build-package.hxx
index a0e1082..8377158 100644
--- a/libbrep/build-package.hxx
+++ b/libbrep/build-package.hxx
@@ -132,11 +132,13 @@ namespace brep
lazy_shared_ptr<build_repository> internal_repository;
bool buildable;
- // Mapped to the package object builds, build_constraints, and
- // build_configs members using the PostgreSQL foreign table mechanism.
+ // Mapped to the package object builds, build_constraints,
+ // build_auxiliaries, and build_configs members using the PostgreSQL
+ // foreign table mechanism.
//
build_class_exprs builds;
build_constraints constraints;
+ build_auxiliaries auxiliaries;
build_package_configs configs;
// Group the builds and constraints members of this object as well as of
@@ -191,7 +193,7 @@ namespace brep
#pragma db member(requirements_tests_section) load(lazy) update(always)
- // builds and constraints
+ // builds, constraints, and auxiliaries
//
#pragma db member(builds) id_column("") value_column("") \
section(constraints_section)
@@ -199,9 +201,12 @@ namespace brep
#pragma db member(constraints) id_column("") value_column("") \
section(constraints_section)
+ #pragma db member(auxiliaries) id_column("") value_column("") \
+ section(constraints_section)
+
// configs
//
- // Note that build_package_config::{builds,constraints} are
+ // Note that build_package_config::{builds,constraints,auxiliaries} are
// persisted/loaded via the separate nested containers (see commons.hxx
// for details).
//
@@ -229,6 +234,17 @@ namespace brep
id_column("") key_column("") value_column("") \
section(constraints_section)
+ #pragma db member(config_auxiliaries) \
+ virtual(build_auxiliaries_map) \
+ after(config_constraints) \
+ get(odb::nested_get ( \
+ brep::build_package_config_auxiliaries (this.configs))) \
+ set(brep::build_package_config_auxiliaries as; \
+ odb::nested_set (as, std::move (?)); \
+ move (as).to_configs (this.configs)) \
+ id_column("") key_column("") value_column("") \
+ section(constraints_section)
+
#pragma db member(constraints_section) load(lazy) update(always)
private: