biscuit icon indicating copy to clipboard operation
biscuit copied to clipboard

Nullability

Open divarvel opened this issue 2 years ago • 1 comments

Support for array and map types #135 implies the ability to query them. Since querying an array or a map is a partial operation, we need a way to handle errors / missing values.

Since biscuit datalog is untyped (for good reason imo, as much as i love types, i'm not sure how they could fit in the picture), a good solution for that would be to use a special null value for that.

Along with null, we need to define how it would interact with the rest of datalog:

  • behaviour with == (imo: behave as other values and return true when compared with null, false otherwise)
  • behaviour with other operators / methods (imo: behave as other values and blow up)
  • should it be possible to define it as a literal, or should it be only introduced by faillible operations?
  • defaulting operator (eg ??)

divarvel avatar Oct 10 '23 09:10 divarvel

noting that it is related to https://github.com/biscuit-auth/biscuit/issues/130 because if we test equality of null with any other types, then equality between different types should not return an invalid type error

Geal avatar May 22 '24 14:05 Geal