Download the PHP package xtompie/aql without Composer
On this page you can find all versions of the php package xtompie/aql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package aql
Short Description Array Query Language - building a SQL using array
License MIT
Informations about the package aql
Array Query Language
- Array Query Language
- Requiments
- Installation
- Docs
- Api
- Select
- Prefix
- From
- Join
- Group
- Having
- Order
- Limit
- Offset
- Where
- String key
- Int key and string value
- Int key and array value
- Insert
- Platform
- Extending
Building SQL prepared statment with binds using array
Requiments
PHP >= 8.0
Installation
Using composer
Docs
Api
Select
The |
character can be specified at the beginning of key or value to use the raw sql fragment
Prefix
From
Keywords are quoted.
Join
Group
Having
Array of conditions can be set as having. It behaves as where conditions. See Where.
Order
Order is a raw sql fragment.
Limit
Limit is casted to int.
Offset
Offset is casted to int.
Where
String key
When condition key is a string then expected is column name with optional comparison operator.
Compartition operator is expected after first space or :
character.
Available compartition operators are all valid SQL comparition operators and aditional:
eq
is =
,
gt
is >
,
ge
is >=
,
lt
is <
,
le
is <=
,
not
, neq
is !=
,
like
is LIKE
,
in
is IN
,
notin
is NOT IN
,
between
is BETWEEN
,
notbetween
is NOT BETWEEN
,
The |
character can be specified at the beginning of key to use the raw sql fragment.
By default logical operator for all condition is AND
.
Logical operator can by change using :operator
key.
Int key and string value
Int key and array value
Insert
Platform
Build in supported platforms:
Xtompie/Aql/MySQLPlatform
,Xtompie/Aql/PostgreSQLPlatform
.Xtompie/Aql/SQLitePlatform
.
Using PostgreSQL
:
Extending
By decorating