Open bamarco opened 8 years ago
@metasoarous Did you want additional functionality or is something like this what you're thinking?
{:db/id #db/id[:db.part/user -200]
:e/type :e.type/Pull
:db/ident :dat.view.pull-category-item-names
:e/description "Pulls all the names of entities from the given category"
:e/pull [{:e/_Category [:e/name]}]}
{:db/id #db/id[:db.part/user -201]
:e/type :e.type/Query
:db/ident :dat.view.choices-by-category
:e/description "Pulls all the names of entities from every category"
:e/query
[:find (pull ?category ?pull-expr)
:where
[?category :db/ident :e.type/Category]
[?pull :db/ident :dat.view.pull-category-item-names]
[?pull :e/pull ?pull-expr]]}
pull and q expressions should be serialize-able into the database itself for later reuse.