Skip to content

v0.4.4 - Adding `time` and `uuid` builtins

Compare
Choose a tag to compare
@matajoh matajoh released this 24 Sep 16:10
· 2 commits to main since this release
3eb9a7c

Point release adding the uuid, time, and walk builtins.

In order to add support for the time built-ins that worked cross-platform and with the widest
range of C++ compilers, we had to introduce a dependency on the date
library. This contains a full implementations of the std::chrono functionality which will eventually be
supported across most c++ compilers as part of the STL. In particular, it provides the crucial Time Zone
lookup functionalities required by the Rego time built-ins. The Time Zone lookup requires a valid
tzdata database from the IANA. This can either be configured to use the local
system TZ data (default for Linux variants) or a manual database (default for Windows). If the REGOCPP_USE_MANUAL_TZDATA flag
is set, then the project will download the latest database and install it as part of its build process.

New Features

  • Added the uuid built-ins
  • Added the time built-ins
  • Added the walk built-in
  • It is now possible for BuiltInDef implementations to cache values or otherwise maintain state. To facilitate this,
    a new virtual clear() method has been added which will be called at the start of each query evaluation.

Bug Fixes

  • Fixed a bug with adding zero to negative integers.