Download the PHP package nilportugues/sql-query-formatter without Composer
On this page you can find all versions of the php package nilportugues/sql-query-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nilportugues/sql-query-formatter
More information about nilportugues/sql-query-formatter
Files in nilportugues/sql-query-formatter
Package sql-query-formatter
Short Description A very lightweight PHP class that reformats unreadable and computer-generated SQL query statements to human-friendly, readable text.
License MIT
Homepage http://nilportugues.com
Informations about the package sql-query-formatter
SQL Query Formatter
A very lightweight PHP class that re-formats unreadable or computer-generated SQL query statements to human-friendly readable text.
- 1.Installation
- 2. Features
- 3. Usage
- 4. Code Quality
- 5. Author
- 6. Special Thanks
- 7. License
1.Installation
The recommended way to install the SQL Query Formatter is through Composer. Run the following command to install it:
2. Features
Human readable SQL formatting
- Human readable plain text. No colours, no highlighting. Plain text is good enough in most cases.
Data Binding Awareness
- SQL Query Formatter takes data binding seriously.
- Placeholder syntax such as
:variable
or?
is taken into account and is preserved when formatting.
3. Usage
Sample code:
Real output:
4. Fully tested
Testing has been done using PHPUnit and Travis-CI. All code has been tested to be compatible from PHP 5.4 up to PHP 5.6 and HHVM (nightly release).
To run the test suite, you need Composer:
5. Author
Nil Portugués Calderó
6. Special Thanks
I would like to thank the following people:
- sql-formatter implementation I used as a basis for building this version.
7. License
SQL Query Formatter is licensed under the MIT license.