Skip to content

Conversation

@preuss-adam
Copy link
Contributor

@preuss-adam preuss-adam commented Jan 21, 2026

Submitting on behalf of @saoirse-a

Adds support for Datalog features from Biscuit 3.3 except for FFI, which are:

  1. Syntax change: sets use braces not brackets
  2. Syntax change: Strict equality uses === and !==
  3. Syntax change: || and && compile to LazyAnd / LazyOr
  4. Reject if checks
  5. Null terms
  6. Array terms
  7. Map terms
  8. Closure operators
  9. Op: Heterogeneous equality / nonequality
  10. Op: Lazy and/or
  11. Op: TypeOf
  12. Op: Get
  13. Op: Any
  14. Op: All
  15. Op: TryOr

Refactors

Op.Value and Expression.Value are eliminated, instead Term inherits from Op and Expression, saving an indirection/allocation.

SchemaVersion refactored (and duplicate implementation of SchemaVersion eliminated) to be clearer and avoid an unnecessary allocation.

Test changes

SamplesTest changed to deal with the additional complexities that maps bring. Most importantly, we cannot rely on a byte-for-byte comparison of the generated datalog block with the sample, because maps do not have a canonical order among their members. Instead we rely on the serialise / deserialise step to check roundtrips and add a check that we are generated the same version number for blocks (which is the only other thing I saw caught by these assertions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants