Re:What ORMs have taught me: just learn SQL (2014)
by thomasahle on Monday June 27, 2016 @02:03AM
(#11984413)
Does database/sql check syntax at compile time? Or do you just try to unit-test you out of that?
Re:What ORMs have taught me: just learn SQL (2014)
by snuxoll on Monday June 27, 2016 @04:18AM
(#11984815)
No, but even though Entity Framework (as an example) does check types at compile time it doesn't prevent you from making mistakes that will cause runtime errors (oh the number of times I have run into issues trying to do simple things like ThingsToCheck(x => x.Created <= DateTime.Now.AddHours(-1)) which you would think works, after all it compiles, but it will just throw a runtime error because LINQ to Entities doesn't know how to parse the expression tree).
Type-safe ORM's don't preclude integration testing, end of story.
Only on some languages. As I mentioned on another comment, on Go I'm very productive using simple database/sql + sqlx. On C# I could die writing mapping boilerplate before getting any business logic done.