3 ms·
I generally agree. Are there frameworks or db access libraries that just offer some helpers around plain ole SQL? Seems like very framework/ORM invents it's own
by pbreit 11y ago
I generally agree. Are there frameworks or db access libraries that just offer some helpers around plain ole SQL? Seems like very framework/ORM invents it's own query DSL.
- bluejekyll 11y agoIn Java I really liked MyBatis for this, and I think fits what you are asking.
- mking1024 11y agoIn the .NET world we have Dapper (https://github.com/StackExchange/dapper-dot-net https://github.com/StackExchange/dapper-dot-net), which lets us write queries in plain old SQL. It's a very useful little library. I believe StackOverflow use it for their data access. Example: var posts = connection.Query<Post>("select * from posts where user_id = @UserId", param: new { UserId = 1 });
- arethuza 11y agoI really like Dapper - allows you to write "raw" SQL but does the tedious bit of mapping to/from objects in a nice way.