donut-party / datapotato

better database fixtures for Clojure tests! 🥔
Other
121 stars 1 forks source link

ID other than integer #2

Closed jeans11 closed 1 year ago

jeans11 commented 1 year ago

Hi! Can an ID be other than an integer. Maybe an UUID or ObjectId?

flyingmachine commented 1 year ago

Are you referring to examples like this?

(def ID
  [:and {:gen/gen monotonic-id-gen} pos-int?])

If you are, then the short answer is yes :) You could have something like (def ID uuid?). The longer answer is that it would probably be helpful to read malli's docs, as they more better explain what's going on here.

jeans11 commented 1 year ago

Thanks @flyingmachine.