Handling Complex WHERE clauses with a PHP Query Builder

后端 未结 5 2172
执念已碎
执念已碎 2021-02-02 01:28

There are several ActiveRecord styled query builder libraries out there. Some are stand alone and some come built into frameworks. However, they really have trouble with WHERE a

5条回答
  •  忘掉有多难
    2021-02-02 02:20

    SQLAlchemy's API is the best one I've worked with so far. It's a Python-library, but you can still be inspired by it. It's not only for WHERE-clauses --- the entire SQL query (be it a select or DML) is expressed with a data structure that is easily modifiable.

    (I'm referring to its SQL-toolkit, not the ORM-parts. :-)

提交回复
热议问题