Open frenchy64 opened 3 months ago
Merge first: https://github.com/metosin/malli/pull/1029
In prototyping phase. Overall goal is to obviate the need for :and, :not, and :fn schemas, in particular because of their brittle generators. It also leads more more relevant error messages https://github.com/metosin/malli/issues/1001.
:and
:not
:fn
TODO
Ideas:
:or
[:map {:or [:a :b :c]} ..]
:keys
:keyset
:set
:map-of
[:int {:> 5 :< 10}]
[:and :int [:> 5] [:< 10]]
:min
:max
:double
:gen/min
:gen/max
:gen/and
:gen/or
:string
:dispatch
[:multi {:dispatch :db/valueType} [:db.type/tuple [:map {:xor [:db/tupleType :db/tupleAttrs :db/tupleTypes]} [:db/tupleType {:optional true} ...] [:db/tupleAttrs {:optional true} ...] [:db/tupleTypes {:optional true} ...]]]] ==> [:map {:dispatch [:db/valueType [:db.type/tuple [:xor :db/tupleType :db/tupleAttrs :db/tupleTypes]]] [:db.type/string ...] [:db.type/ref ...]} [:db/tupleType {:optional true} ...] [:db/tupleAttrs {:optional true} ...] [:db/tupleTypes {:optional true} ...]]
Merge first: https://github.com/metosin/malli/pull/1029
In prototyping phase. Overall goal is to obviate the need for
:and
,:not
, and:fn
schemas, in particular because of their brittle generators. It also leads more more relevant error messages https://github.com/metosin/malli/issues/1001.TODO
Ideas:
:or
property[:map {:or [:a :b :c]} ..]
:keys
to:keyset
:set
with the same properties for heterogeneous sets:map-of
with keyset constraints:keyset
to:and
.[:int {:> 5 :< 10}]
, easier to generate than[:and :int [:> 5] [:< 10]]
.:min
:max
constraints so they can participate in constraint resolution:double
:gen/min
:gen/max
into account earlier during solution generation:gen/and
:gen/or
etc?:string
constraints:dispatch
constraint