diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-22 19:12:55 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-23 15:40:29 +0300 |
commit | 3d7f248ee7aa7e5b470cb9bc2fcf76852e798db5 (patch) | |
tree | 81104c01134be4eda13d5f0b1fc8320a9f6a2544 /libbrep/common.hxx | |
parent | bad54b28bcc59fe5d19ecaf486f52e6359009e68 (diff) |
Make poll interval for unloaded tenant configurable and rename loaded_timestamp tenant member to unloaded_timestamp
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r-- | libbrep/common.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 1433c8c..4be9ce9 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -141,6 +141,20 @@ namespace brep std::chrono::nanoseconds (*(?)))) \ : brep::optional_timestamp ()) + #pragma db map type(duration) as(uint64_t) \ + to(std::chrono::duration_cast<std::chrono::nanoseconds> (?).count ()) \ + from(brep::duration (std::chrono::nanoseconds (?))) + + using optional_duration = optional<duration>; + + #pragma db map type(optional_duration) as(brep::optional_uint64) \ + to((?) \ + ? std::chrono::duration_cast<std::chrono::nanoseconds> (*(?)).count () \ + : brep::optional_uint64 ()) \ + from((?) \ + ? brep::duration (std::chrono::nanoseconds (*(?))) \ + : brep::optional_duration ()) + // version // using bpkg::version; |