EDIT: When in doubt, read the documentation! PostgreSQL allows you to define your own procedural language to use with the model. Maybe I should be exploring what this means with regard to doing everything via stored procedures in a statically typed functional language. Maybe some OCaml extension is out there or something?
——
Definitely interesting, but I get the sense that it will suffer from the same problems that most ORMs I have used experience. It looks similar to the experience of using ORMs in statically typed languages.
You might be able to achieve this vision in a transpiled language if you can cover exact semantic equivalence for the entire language. I’m skeptical that it is possible without a huge engineering effort by this library, though, because it is targeting multiple different “runtimes” eg dbs.
I’d love to see DB authors of popular DB engines introduce support for some other language to support querying the relational model more directly, though, things like the postgresql jsonb query format not withstanding.
That would not require any parity or expectation of parity with SQL. Maybe I’ll do some research to see if I can find any initiatives along this line. I’m just amazed that this space isn’t better built-out vs, say, Haskell, given the huge buy-in for relational DBs and the amount of time that SQL has been around.
Anyway, thanks for the links! Getting setup with that first one now.