The :constrain
operator allows you to compose multiple constraints in one operation for concision.
This is unique among queries only because constraints run for their side effects, so fan-out and check results is a valid approach.
[[:from :Person]
[:constrain
[:req :name]
[:check [string? :name] [nat-int? :age]]
[:fk Address {:address-id :id}]
[:unique :email]]]
Pure sugar, otherwise unremarkable, see constraints for more detail on individual constraint operators.`
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close