by simplify · 8y ago · 0 comments
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'
};