Fork me on GitHub

First release of - get metadata for JDBC dbs and use that to generate basic specs or schemas. Huge thanks to @seancorfield for next-jdbc, which this relies on, and whose source code helped me figure out how to work with jdbc. Also thanks to @mpoffald for contributing and helping me think it through. I’m going to be demoing this

🆒 6
👏 12
👀 5
🙌 6
👍 33
❤️ 6
🎉 19
🕶️ 3
Noah Bogart15:11:45

yooooooooo this is sick

🙏 1
Noah Bogart15:11:28

One of my favorite parts of rails is schema.rb which acts as a canonical in-code representation of the database, which makes checking "how is this all connected?" as simple as reading a single file (instead of sending multiple queries in a database repl and figuring it out yourself). This pretty neatly solves that problem if you use a wrapper around a migration library (like migratus)


yes! That’s something I miss from rails too. I really like that idea

Noah Bogart15:11:55

Is it possible to use We've not begun switching over yet


you can use both side by side without having conflicts AFAIK


hmm yeah xray could take an optional second argument, an adapter config that’s merged with the default

metal 2

@U0541KMAZ ok I threw that in without really checking it but I think it should work 😅

metal 1

amazing work!


Love the name!


> Is it possible to use We've not begun switching over yet We have both in our codebase at work. We create a HikariCP connection pooled datasource from our db-spec hash map at startup and then pass {:datasource cpd} around our code as db-spec. That works as-is with c.j.j and, since next.jdbc 1.2.790, that also works as-is so it's easy to use the two together while you migrate. Prior to that, when we called next.jdbc we passed (:datasource db-spec). Just bear in mind that c.j.j's default is rs/as-unqualified-lower-maps in next.jdbc unless you also change the code to handle the results (which we mostly did not do). So you can easily switch one call at a time.

👍 1

@U0AQ1R7FG yep,;cid=C06MAR553 to create the schema! might need to only take the “`table-name`” once though?

=> (csk/->PascalCaseSymbol :foo)
=> (csk/->PascalCaseSymbol :foo :foo)

Execution error 
No value supplied for key: :foo


whoops thanks, good catch!


woooo man this is awesome!


😊 thanks! @mpoffald helped me with it. I hope it’ll be useful for people!

❤️ 1
Ben Sless20:11:27

So cool! One of the things which was on my list of "when I get to it or get angry enough" Thank you!

❤️ 1
Ben Sless20:11:26

Tiny suggestion regarding malli schema: emit a registry and not def forms?


hmm what do you think of having both? generate-defs generate-registry

Ben Sless20:11:22

I certainly see no reason to object 🙃

Ben Sless20:11:12

Now imagine plugging this in to clerk, portal, etc 👀

😮 1
Ben Sless20:11:56

You made a db explorer, buddy. Or at least the building blocks for one. Congrats 🙂

🙏 2
Ben Sless20:11:26

You can also write a db client. A desktop client. With membrane!


I think that would be super dope!


Clojure Goes Fast has kickstarted its new shiny knowledge base with detailed documentation on clj-async-profiler. Basically, everything from the blog posts got restructured, edited, and revitalized, and some fresh guides were added.

🎉 46

First* release of, a library for handling database fixtures for tests! It’s great for making tests clearer, more concise, and easier to maintain, and it has integrations for next-jdbc, XTDB, and datomic. *datapotato is a fork of and should be 100% backwards-compatible (you should only need to change your namespace requires). datapotato provides better interfaces for the intended use case, and it should be easier to get productive with it

🥔 26
💯 10
gratitude 4

You can use to help you get started with datapotato - dbxray can generate the clojure specs / malli schemas you need to generate data, plus the “potato schema” datapotato needs to handle entity hierarchies

clojure-spin 3
Ben Sless05:11:14

Really went looking for a "Because I'm a potato" quote in the readme 😄

😅 1
🥔 1