aboutsummaryrefslogtreecommitdiff
path: root/libbrep/package.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-05-01 22:32:11 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-05-15 17:36:01 +0300
commit8f9a80a9ac8f353ce2cdafa23f0e5163d30d5800 (patch)
treeedb89ce300c831897cbe80b9e4e2000b0807acff /libbrep/package.hxx
parent038ba04cc0e5a6b933254813c34108d6e3fd4a38 (diff)
Add support for description-type package manifest value
Diffstat (limited to 'libbrep/package.hxx')
-rw-r--r--libbrep/package.hxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index 2f293c1..2e31ff4 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -21,7 +21,7 @@
//
#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 11
-#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 11, closed)
+#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 12, closed)
namespace brep
{
@@ -45,6 +45,21 @@ namespace brep
#pragma db value(priority) definition
#pragma db member(priority::value) column("")
+ // text_type
+ //
+ using bpkg::text_type;
+ using bpkg::to_text_type;
+
+ #pragma db map type(text_type) as(string) \
+ to(to_string (?)) \
+ from(brep::to_text_type (?))
+
+ using optional_text_type = optional<text_type>;
+
+ #pragma db map type(optional_text_type) as(brep::optional_string) \
+ to((?) ? to_string (*(?)) : brep::optional_string ()) \
+ from((?) ? brep::to_text_type (*(?)) : brep::optional_text_type ())
+
// url
//
using bpkg::url;
@@ -348,6 +363,7 @@ namespace brep
license_alternatives_type,
strings tags,
optional<string> description,
+ optional<text_type> description_type,
string changes,
optional<url_type>,
optional<url_type> doc_url,
@@ -396,7 +412,8 @@ namespace brep
string summary;
license_alternatives_type license_alternatives;
strings tags;
- optional<string> description;
+ optional<string> description; // Absent if type is unknown.
+ optional<text_type> description_type; // Present if description is present.
string changes;
optional<url_type> url;
optional<url_type> doc_url;