Download the PHP package 1owe1/query-box without Composer
On this page you can find all versions of the php package 1owe1/query-box. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download 1owe1/query-box
More information about 1owe1/query-box
Files in 1owe1/query-box
Download 1owe1/query-box
More information about 1owe1/query-box
Files in 1owe1/query-box
Vendor 1owe1
Package query-box
Short Description SQL immutable query builder
License MIT
Homepage https://github.com/1ove1/query-box
Package query-box
Short Description SQL immutable query builder
License MIT
Homepage https://github.com/1ove1/query-box
Please rate this library. Is it a good library?
Informations about the package query-box
Query Box - immutable SQL query builder with minimum dependencies
Description
Actual features:
- Select, insert, update, delete;
- Where, join (inner, left, right), limit, order by;
- Sub select queries;
- Simple migration tools.
Setup
-
Instal package from composer:
-
Setup db connection params in your $_ENV directly (like bootstrap action) or use .env parser instead:
- Create your first model (or use QueryBuilder::table('my_table')):
Migration example:
Usage:
Configuration
App expect these global variables:
- Debug options:
- $_ENV['LOG_QUERY_RESULTS'] (boolean, false by default) - logg raw queries into the log file (require log path otherwise log will be output in std);
- $_ENV['LOG_PATH'] (string) - path to log file;
- DB connection:
- $_ENV['DB_TYPE'] (mysql/pgsql, mysql by default) - type of db (for now support only mysql and pgsql);
- *$_ENV['DB_NAME'] (required) - name of db;
- $_ENV['DB_HOST'] (localhost by default) - host of db;
- $_ENV['DB_PORT'] (3306 by default) - db port;
- *$_ENV['DB_USER'] (required) - db username or role;
- *$_ENV['DB_PASS'] (required) - db pass.
Tests
Tests defined into ./test directory (QueryBox\Tests\ namespace), use './vendor/bin/phpunit'.
Also you can use phpstan by './vendor/bin/phpstan' (level 9 by default).
Examples
You also can find some examples into ./example directory.
All versions of query-box with dependencies
PHP Build Version
Package Version
The package 1owe1/query-box contains the following files
Loading the files please wait ....