walkable-server / walkable

A Clojure(script) SQL library for building APIs: Datomic® (GraphQL-ish) pull syntax, data driven configuration, dynamic filtering with relations in mind
https://walkable.gitlab.io/
Eclipse Public License 2.0
445 stars 15 forks source link

ad-hoc columns #84

Closed myguidingstar closed 5 years ago

myguidingstar commented 6 years ago
;; schema
{:adhoc-column-prefixes #{"adhoc"}}

;; query
{[:person/by-id 1]
 [:person/name
  (:adhoc/age {:expression [:- 2018 :person/yob]})
  (:adhoc/yob-str {:expression [:cast :person/yob :text]})]}

;;result
{[:person/by-id 1]
 {:person/name "jon"
  :adhoc/age 38
  :adhoc/yob-str "1980"}}