3 ms·
Does EdgeDB support variants[0]? I've always dreamed of a database that did. [0] e.g. https://reasonml.github.io/docs/en/variant.html https://reasonml.github.i
by simplify 8y ago
Does EdgeDB support variants[0]? I've always dreamed of a database that did.
[0] e.g. https://reasonml.github.io/docs/en/variant.html https://reasonml.github.io/docs/en/variant.html
- RedCrowbar 8y agoIn a way, yes. EdgeDB implements type inheritance and abstract types, so you can have a schema like: abstract type Text: link body -> str type Post extending Text type Comment extending Text And then query Text instances like this: SELECT Text { body, title := 'Post' IF Text IS Post ELSE 'Comment' IF Text IS Comment ELSE 'unknown' };