You should use the most powerful and convenient language you have at your disposal, which is most likely the host language.
ORMs are funny things, it's like we got stuck in the idea of making the database object oriented. MongoDB just means we don't have to pretend anymore, not that it was a good idea.
It is perfectly possible to use relational concepts in a general purpose language. Tables, Columns, Foreign Keys, Records, Indexes, Queries etc. And you can build whatever Model abstractions you need on top of that; or not, for simple CRUD you don't really need a type system.
I usually build that layer along with the foundation of the application, it still evolves slightly every time around but the basics are very tried and proven by now.
ORMs are funny things, it's like we got stuck in the idea of making the database object oriented. MongoDB just means we don't have to pretend anymore, not that it was a good idea.
It is perfectly possible to use relational concepts in a general purpose language. Tables, Columns, Foreign Keys, Records, Indexes, Queries etc. And you can build whatever Model abstractions you need on top of that; or not, for simple CRUD you don't really need a type system.
I usually build that layer along with the foundation of the application, it still evolves slightly every time around but the basics are very tried and proven by now.
https://github.com/codr7/hostr/tree/main/src/Hostr/DB