Liking cljdoc? Tell your friends :D

:constrain

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 builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close