|
|
|
|
|
by kbenson
3695 days ago
|
|
I find by far the most useful aspect of ORMs is the query builder, when done well. Much of the time I'm telling my ORM to output in core data types for speed anyway. Having a query builder that allows me to create my own methods for encapsulating common query actions is too useful to give up though. For example: my @movies = Schema->Movie->recent->starring("brad pitt")->all;, where recent is a method to restrict movies by age, and starring is a method to join on the actors table and restrict to a specific actor. |
|
I suspect this is particular to SQLAlchemy, but if not I'd prefer just to roll my own SQL going forward.