4 ms·
You're right, except for when you need to support multiple database backends. For projects it's usually not a concern, but for libraries it certainly is. The OR
by jsmeaton 10y ago
You're right, except for when you need to support multiple database backends. For projects it's usually not a concern, but for libraries it certainly is. The ORM has been slowly adding more and more complex types (Expressions) for more complex use cases, which can be mostly ignored for regular CRUD apps.
- mozumder 10y agoAren't SQL subqueries pretty much standard across all databases anyways? Why would writing them in Django's ORM be more compatible?
- jsmeaton 10y agoField names, table names, quotes or not - a few examples of things that can differ. The syntax of subqueries themselves are standard AFAIK. Building subqueries inside Django gives the rest of Django access to them for things like aggregation or filters.