Open fonghou opened 1 month ago
Hey @fonghou i'm currently working on integrating hsql to borkweb. Which is basically a file based sql database like sqlite and it supports the entire workflow that is currently in place with borkweb. Would that be sufficient for you? or do you need sqlite.
https://github.com/m3tti/borkweb/commit/90671d3415d9341f860422b5ba4e98558cf7c8de hypersql added to master
Hey @m3tti, thanks for the update. I think sqlite3 would still be valuable for borkweb because it doesn't need a heavy JVM to run whereas hsql does. In addition, sqlite3 has much larger ecosystem than hsql e.g. https://litestream.io.
good point i'll take a look into it. i love sqlite :D it fits the theme of borkweb really well. Btw you are always welcome to participate ;)
ok looked into it i guess the easiest way would be to extend the pods from @borkdude over here https://github.com/babashka/babashka-sql-pods
The https://github.com/babashka/pod-babashka-go-sqlite3 can be used directly, why would you want to use babashka-sql-pods for sqlite?
I could be wrong but doesn't the https://github.com/babashka/pod-babashka-go-sqlite3 have two diffrent functions for quering and executing? Maybe i'm wrong but if that isn't the case and it fits the normal jdbc workflow that would be awesome.
The API is probably inspired by the underlying golang library but perhaps a small layer in between in borkweb would fix that incompatibility
Ok i guess that should be the way to go than. Due to the fact that the sqlite3 port to for jdbc seems a little bit hard to accomplish in short term i guess. I'll look into it.
currently i have added in https://github.com/m3tti/borkweb/tree/1-support-sqlite3 a first simple version of sqlite. The current problem i have is that the results get no namespaces for the returning maps. Meaning i have {:name value}
but i want to have {:tablename/name value}
no clue if thats easily doable. Furthermore an insert doesn't return the keys of the entity like in jdbc. Currently no clue how to work around it. I guess one solution would be if we figure out the table name we can query the db for the entry that just got written by the internal sqlite id that's supported for each entry and returned by the sqlite pod. Any other ideas @borkdude @fonghou ?
Support pod-babashka-go-sqlite3 out of box in bb.edn.
It'd be even simpler just
bb dev
to start a full-stack app.