have looked at it, but haven’t heard of anyone using. not super popular.
but, I nice idea. not sure how many ways there are to describe such things.
Is there a way I can use malli to generate datomic schema?
not ‘out of the box’ per se but it’s pretty straight forward. depends on the way you define your schemas. We use the dynamic registry sort of like spec, so our attributes are first class which sort naturally maps to datomic, and then just map over the registry for our attrs, :{db/ident <attr> :db/valueType (malli-to-datomic …) …}
theres of course specific stuff you’ll probably do for enums :my/enum [:enum :a :b]
becomes norms for a :my/enum
ref and :my.enum/a
, etc. :map’s to refs, etc. We have our own custom options for additional customization when we generate.
also, this video talks about this in general in terms of using malli to drive a lot of the rest of your app. https://www.youtube.com/watch?v=ww9yR_rbgQs&t=696s
is there a way to muck with option values based on a predicate? in pseudo-malli…
[:map
[:a :boolean]
[:b {:optional #(true? :a)} :boolean]]