Re:Write an SQL query builder in 150 lines of Python
by zzzeek on Friday August 27, 2021 @12:21PM
(#28329686)
if you want to write one SQL query, you should not use a SQL builder and/or ORM.
if you want to write thousands of SQL queries that naturally derive from an object model of 30, 100, or 800 domain classes or so and would otherwise be thousands of lines of repetitive boilerplate if all typed out individually, then you use a query builder and/or ORM.
if you want to write thousands of SQL queries that naturally derive from an object model of 30, 100, or 800 domain classes or so and would otherwise be thousands of lines of repetitive boilerplate if all typed out individually, then you use a query builder and/or ORM.
different tools for different jobs.