Does EdgeDB support variants[0]? I've always dreamed of a database that did.
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'
};