|
|
|
|
|
by takeda
2388 days ago
|
|
I don't know what kind of operations you're doing, but I started having issues for anything that's not trivial. Perhaps those are achievable, but then in addition to knowing SQL I also need to know ORM (which is also different per language) Some things: - to make my application scalable I want two endpoints one that is read only, that goes to replicas and one that goes to master for modification. That way in my application I have full control which queries go to replica and which need master - use datatypes that are recommended by the database - do upsert - do select and only return fields that I need - perform insert and return only fields that I want (my ORM was performing another select) - ORM also does bunch of queries that I don't need, I don't want it to add extra load to database if I never use the results of it Those are very simple things, but I'm also curious how you can do some advanced operations like group by having, window functions, CTEs, aggregate functions that return JSONB structure (so you don't have to send duplicate data and avoid N+1 queries). How do you use PostGIS? |
|
You don't! That is not what an ORM is for. Use SQL. Any decent ORM with allow you to integrate SQL.
Check out the Fluent (query builder) and Eloquent (ORM) from Laravel. They allow all the features you want.