4 ms·
Most databases allow you to write extensions in your language of choice, this can be a good middle ground where you write domain specific DB extension in the la
by Loic 3y ago
Most databases allow you to write extensions in your language of choice, this can be a good middle ground where you write domain specific DB extension in the language of your application, this way, you can share logic between your database and your application layer.
I do that in Go for chemical stuff, I am pleased with this approach.
- bborud 3y agoWhich database are you using and what kind of extensions are we talking about? (I often create Go types which are then serialized to some useful representation in the database, and de-serialized to Go types when I query the database. I usually use SQLX for most interaction with SQL databases since it does a lot of the tedious work for me (without introducing ORM'y madness). On the rare occasion where this eats too much into performance I can always use the DB library directly)
- justinclift 3y agoInterestingly, there's an unofficial Go procedural language for PostgreSQL: https://gitlab.com/microo8/plgo https://gitlab.com/microo8/plgo Haven't tried it out myself though.
- Loic 3y agoSQLite, I register specific functions written in Go if I want to not load the stuff in memory.