|
| __construct (string $opr="AND") |
|
| table (string $table) |
|
| setDelim (string $delim) |
|
| convert (string $table="") |
|
| getParams () |
|
| where (string $column, $value, string $lOpr=Predicate::OPR_EQUAL, string $cOpr="AND") |
|
| orWhere (string $column, $value, string $opr=Predicate::OPR_EQUAL) |
|
| groupWhere (\Closure $predicates, string $cOpr="AND") |
|
| orGroupWhere (\Closure $predicates) |
|
| nestedWhere (string $column,\Closure $nested, string $lOpr=Predicate::OPR_IN, string $cOpr="AND") |
|
| orNestedWhere (string $column,\Closure $nested, string $lOpr=Predicate::OPR_IN) |
|
|
| $table = "" |
|
| $list = [] |
|
| $opr = "" |
|
| $params = [] |
|
| $delim = "" |
|
SlaxWeb\Database\Query\Where\Group::__construct |
( |
string |
$opr = "AND" | ) |
|
Class constructor
Sets the logical operator that will be used to link this Predicate Group in the SQL DML WHERE statement.
- Parameters
-
string | $opr | Logical operator name, default string("AND") |
SlaxWeb\Database\Query\Where\Group::convert |
( |
string |
$table = "" | ) |
|
Convert Predicate Group to Statement
Creates the SQL DML Where statement from the predicate list and returns it to the caller. Takes the name of the table to be prepended to the column names as input. If nothing is supplied, then the property 'table' is used.
- Parameters
-
string | $table | Name of the table to prepend column names with, default string("") |
- Returns
- string
SlaxWeb\Database\Query\Where\Group::getParams |
( |
| ) |
|
Get parameters
Returns the list of parameters for this predicate.
- Returns
- array
SlaxWeb\Database\Query\Where\Group::groupWhere |
( |
\Closure |
$predicates, |
|
|
string |
$cOpr = "AND" |
|
) |
| |
Add Where Predicate Group
Adds a group of predicates to the list. The closure received as input must receive the builder instance for building groups.
- Parameters
-
Closure | $predicates | Grouped predicates definition closure |
string | $cOpr | Comparisson operator, default string("AND") |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::nestedWhere |
( |
string |
$column, |
|
|
\Closure |
$nested, |
|
|
string |
$lOpr = Predicate::OPR_IN , |
|
|
string |
$cOpr = "AND" |
|
) |
| |
Where Nested Select
Add a nested select as a value to the where predicate.
- Parameters
-
string | $column | Column name |
closure | $nested | Nested builder |
string | $lOpr | Logical operator, default Predicate::OPR_IN |
string | $cOpr | Comparisson operator, default string("AND") |
SlaxWeb\Database\Query\Where\Group::orGroupWhere |
( |
\Closure |
$predicates | ) |
|
Or Where Predicate Group
Alias for 'whereGroup' method call with OR logical operator.
- Parameters
-
closure | $predicates | Grouped predicates definition closure |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::orNestedWhere |
( |
string |
$column, |
|
|
\Closure |
$nested, |
|
|
string |
$lOpr = Predicate::OPR_IN |
|
) |
| |
Or Where Nested Select
Alias for 'nestedWhere' method call with OR logical operator.
- Parameters
-
string | $column | Column name |
closure | $nested | Nested builder |
string | $lOpr | Logical operator, default Predicate::OPR_IN |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::orWhere |
( |
string |
$column, |
|
|
|
$value, |
|
|
string |
$opr = Predicate::OPR_EQUAL |
|
) |
| |
Or Where predicate
Alias for 'where' method call with OR logical operator.
- Parameters
-
string | $column | Column name |
mixed | $value | Value of the predicate |
string | $opr | Logical operator |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::setDelim |
( |
string |
$delim | ) |
|
Set DB Object Delimiter
Sets the Database Object Delimiter character that will be used for creating the query.
- Parameters
-
string | $delim | Delimiter character |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::table |
( |
string |
$table | ) |
|
Set table
Sets the table name for the query. Before setting it wraps it in the delimiters.
- Parameters
-
string | $table | Name of the table |
- Returns
- self
SlaxWeb\Database\Query\Where\Group::where |
( |
string |
$column, |
|
|
|
$value, |
|
|
string |
$lOpr = Predicate::OPR_EQUAL , |
|
|
string |
$cOpr = "AND" |
|
) |
| |
Add predicament
Creates a predicate object with the input parameters, and adds it to the list of predicates. It returns an object of itself for method call linking.
- Parameters
-
string | $column | Name of the column for the predicate |
mixed | $value | Value for the predicate |
stirng | $lOpr | Logical operator, default Predicate::OPR_EQUAL |
string | $cOpr | Comparisson operator, default string("AND") |
- Returns
- self
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/database/src/Query/Where/Group.php