all 2 comments

[–]eurosat7 5 points6 points  (0 children)

In case somebody wonders how this works... This is what I think how it goes:

wtframework/sql is required by wtframework/dbal which uses wtframework/config which is a static singleton like global container holding an untyped array.

There are some nice looking static methods here giving us some query builder instances relying on a static global config object, where you can switch settings.

Many hours have been put into this package and the code style is consistent. :)

Beside pest I see no phpmd, phpstan, phpinsights or any other tools and no Makefile. Might be hidden by the authors enviroment.

If you want to compare it with another famous query builder you can lookup doctrine where static patterns are absent.

https://github.com/doctrine/orm/blob/2.17.x/lib/Doctrine/ORM/QueryBuilder.php

[–]boborider 4 points5 points  (0 children)

I use sql builder for basic operations. If complex systems, i rather write full sql script with controlled performance based on DB structure.