I use Entity Framework... because it's the standard. But frankly, I much prefer Dapper and good old SQL.

I use Entity Framework... because it's the standard. But frankly, I much prefer Dapper and good old SQL.
- https://awstip.com/mastering-django-orm-from-models-to-advanced-queries-be22ec26e8bb
-----------------------
Django ORM turns complex database queries into simple Python code. Instead of writing long SQL statements, you can use:
- Basic filters (filter(), exclude(), get()) to find exactly what you need.
- Smart optimisations (select_related(), prefetch_related()) to speed up your app.
- Handy tricks (annotate(), aggregate()) for calculations without extra code.
-------------------------------------
Preview of #LittlePrince, a TUI #Mastodon client. God know why I chose that name:) Just toots, no boosts, and threads! Not quite like #mutt yet (see 2nd s.shot), but we're going steady. A shame I had to fight with #ORM's just to drop them and do all just with SQLite. More on that soon. #Rich will provide the TUI experience, unless someone suggests something else :)
Just discovered that Django doesn't have a median method in its ORM, but found some interesting hack for implementing it https://medium.com/squad-engineering/hack-django-orm-to-calculate-median-and-percentiles-or-make-annotations-great-again-23d24c62a7d0
#django #orm #sql #median
Achievement unlocked: using SQL views with mapped doctrine object. Using ORM instead of dbal to query the view and using serialization to make both version available during testing/performance comparison.
Pour réaliser une migration de base de données, il faut commencer par définir le périmètre de cette migration. Est-elle liée à une fonctionnalité, une version spécifique ?
On va écrire deux scripts pour ce périmètre de migration: un script d'upgrage qui réalise la migration et un script de downgrade qui l'annule
Si l'application a besoin d'une nouvelle table pour sa version 1.0.0, on créera deux scripts: 1.0.0-up.sql qui contient la création de table et 1.0.0-down.sql qui la supprime
#orm #sql
Lors d'un changement de version d'une application web, on a parfois besoin de modifier le schéma de la base de données
Cette modification de la base de données peut être réalisée avec un script de migration, écrit en SQL ou avec un ORM
Si votre application utilise NodeJS, le package umzug permet de réaliser votre migration https://www.npmjs.com/package/umzug peu importe l'ORM/driver SQL que vous utilisez