datalevin

simongray 2025-01-15T11:47:43.288289Z

Can I query the schema itself? I want to co-locate some information about my database attributes with the schema, but I need to display this data in my application too.

simongray 2025-01-15T11:49:05.029379Z

... of course, I could just query the schema data before transacting it in the db. Anyway, I guess my secondary question is this: can I use whatever attributes I want in the schema with no issue?

Huahai 2025-01-16T00:17:12.614099Z

Yes. A schema is just a map of attributes to properties. And a property is just a Clojure map and is stored as such. You can store whatever in there. Clojure maps are open. We follow that philosophy. As long as you don’t remove items DL care about, e.g. :db/aid, you are fine.

πŸ™ 1
simongray 2025-01-16T10:13:09.708749Z

Thanks. Can I also retrieve them using a query?

Huahai 2025-01-16T15:51:06.744009Z

Just call schema function

πŸ™ 1