Fork me on GitHub
#sql
<
2020-09-13
>
practicalli-johnny21:09:09

Has anyone used Clojure specs to generate mock data (hash-map) for persisting to the database, especially using the next.jdbc.sql friendly functions such as insert! ? I have a spec that generates a namespace qualified hash-map that has the data I would use to insert a new record. Seems I may need to drop the namespace qualification on the map (if thats possible) and change the spec to it doesnt contain composite specs for its keys. Any examples of this already out there before I re-invent the wheel?

seancorfield22:09:00

@jr0cket Why do you think you need to drop the namespace qualification?

seancorfield22:09:40

And, yes, at work we generate a lot of test data from specs, and insert it via next.jdbc.sql/insert!.