At the peak of my hyper typing trip, doing lots of Haskell and C++, I was trying to encode all the column/table/query types of my database in the host language.
Nothing I would recommend, perfect doesn't mean its a good idea.
Prisma and Drizzle...those gave me a bit too much heck. Kysley is close enough to SQL while offering some benefits, typings being one of them, but also query builders are often helpful when I need to run subtle variations of the same query, e.g. depending on the user's permissions or to add search filters.
Nothing I would recommend, perfect doesn't mean its a good idea.