db
db copied to clipboard
Allow scalars `int|float|bool` in `Query::select()`
For some cases a query like SELECT 1 FROM ... required.
If allow scalars int|float|bool for columns in Query::select() method, the result could be
$query->select(1) => SELECT 1 FROM ...
or with alias
$query->select(['a' => 1]) => SELECT 1 AS "a" FROM ...
Currently using Query instance it could be done like $query->select(new Expression('1')) or $query->select('(1)')