Releases: PhpGt/SqlBuilder
Builder classes and improved CI
November 2022
First stable release, now the create,drop,alter table query representations are implemented.
What's Changed
- implement stringable interface by @g105b in #24
- build: hard dependencies by @g105b in #25
- maintenance: dependabot by @g105b in #27
- Bump phpstan/phpstan from 1.8.5 to 1.9.2 by @dependabot in #34
- Table queries (create, drop, alter) by @g105b in #35
New Contributors
- @dependabot made their first contribution in #34
Full Changelog: v0.2.0...v1.0.0
New features ready for v1
This release is intended to be feature complete, ready for v1, but as it hasn't been actively used in any real-world project, the v1 release is going to wait.
New features:
- Indexed & named parameter helpers - if you are referencing a field that has the same name as an injected parameter, or the injected parameter is done by index, you can use the
:fieldName
and?fieldName
helper syntax to remove duplication. - OOP improved greatly, abstract classes are more meaningful for example,
delete from tablename
- a delete query can't not have a from table, so now neither can the abstract delete class. insert...select
andreplace...select
queries are now fully implemented.
Compatibility improvements
In this patch pre-release, we are gaining the following improvements:
- All functions have better type safety
- Move to Github Actions CI for greatly improved tests and quality assurance
- Documentation fixes
Main functionality implemented
The SqlBuilder repository gets a major step closer to being production-ready with this pre-release.
Implemented now are the InsertQuery
, SelectQuery
, UpdateQuery
, DeleteQuery
and ReplaceQuery
classes, with all the functions ready for representing tables, conditions, limits, orders, etc.
Still to come before v1 is a refactoring to improve the query classes inheritance (some functionality is shared between different query types), compatibility testing with other database engines, and improvements to the return types of functions.
Base-logic tested
After a few coding explorations, the general layout and workflow of SqlBuilder have been defined. Every type of query extends the abstract SqlBuilder class. These extensions, such as SelectBuilder
will also be abstract, expecting to see developers' classes implement a concrete extension.
Following releases will mark the different types of Builder for Update, Delete, Insert.