3 ms·
It makes your code less portable. Raw SQL means you're essentially tied to a single DB provider. What happens when you need to move to a different one?
by xienze 12y ago
It makes your code less portable. Raw SQL means you're essentially tied to a single DB provider. What happens when you need to move to a different one?
- deleted 12y ago[deleted]
- krapp 12y agoSorry... I meant more portable between applications (assuming you're willing to stick with SQL), obviously not between database providers.
- JimBarrows 12y agoWhat if you don't need to move to a different one?
- Xorlev 12y agoThen you should probably rewrite your statements anyways to take advantage of platform-specific features. I won't write a query on MySQL the same as I would on Postgres, because there's usually a better way. CRUD is about all that can honestly stay the same, as IMO that's where ORMs shine.