River repository contains methods for fetching/counting river items.
More...
|
| | __construct (array $options=[]) |
| | {Constructor.- Parameters
-
| array | $options | ege* options |
} More...
|
| |
| | count () |
| | {Count rows.- Returns
- int
} More...
|
| |
| | calculate ($function, $property, $property_type='annotation') |
| | Performs a mathematical calculation on river annotations. More...
|
| |
| | get ($limit=null, $offset=null, $callback=null) |
| | Fetch river items. More...
|
| |
| | execute () |
| | Execute the query resolving calculation, count and/or batch options. More...
|
| |
| | buildEntityClauses ($qb) |
| | Add subject, object and target clauses Make sure all three are accessible by the user. More...
|
| |
| | __get ($name) |
| | {} More...
|
| |
| | __set ($name, $value) |
| | {} More...
|
| |
| | __unset ($name) |
| | {} More...
|
| |
| | __isset ($name) |
| | {} More...
|
| |
| | batch ($limit=null, $offset=null, $callback=null) |
| | Fetch rows as an ElggBatch. More...
|
| |
| | filter (\Closure $closure) |
| | Filter query prior to execution Callback function will receive QueryBuilder as the first argument and table alias as a second Callback function can either mutate the instance of the QueryBuilder or return a composition expression that will be appended to AND where statements. More...
|
| |
| | select ($expression) |
| | Add SELECT. More...
|
| |
| | join ($joined_table, $joined_alias=null, $join_column=null, $comparison=null, $values=null, $type=null, $case_sensitive=null) |
| | Add JOIN clause Join a database table on an $x to $y comparison. More...
|
| |
| | groupBy ($expression) |
| | Add GROUP BY. More...
|
| |
| | having ($expression) |
| | Add HAVING. More...
|
| |
| | orderBy ($expression, $direction) |
| | Add ORDER BY. More...
|
| |
| | expandInto (QueryBuilder $qb, $table_alias=null) |
| | Extend query builder with select, group_by, having and order_by clauses from $options. More...
|
| |
|
| static | find (array $options=[]) |
| | Build and execute a new query from an array of legacy options. More...
|
| |
| static | with (array $options=[]) |
| | Constructs a new. More...
|
| |
River repository contains methods for fetching/counting river items.
Definition at line 18 of file River.php.
◆ __construct()
| Elgg\Database\River::__construct |
( |
array |
$options = [] | ) |
|
◆ buildEntityClauses()
| Elgg\Database\River::buildEntityClauses |
( |
|
$qb | ) |
|
Add subject, object and target clauses Make sure all three are accessible by the user.
- Parameters
-
- Returns
- CompositeExpression|mixed|null|string
Definition at line 264 of file River.php.
◆ buildPairedAnnotationClause()
| Elgg\Database\River::buildPairedAnnotationClause |
( |
QueryBuilder |
$qb, |
|
|
|
$clauses, |
|
|
|
$boolean = 'AND' |
|
) |
| |
|
protected |
Process annotation name value pairs Joins the annotation table on entity guid in the entities table and applies annotation where clauses.
- Parameters
-
| QueryBuilder | $qb | Query builder |
| AnnotationWhereClause[] | $clauses | Where clauses |
| string | $boolean | Merge boolean |
- Returns
- CompositeExpression|string
Definition at line 308 of file River.php.
◆ buildPairedRelationshipClause()
| Elgg\Database\River::buildPairedRelationshipClause |
( |
QueryBuilder |
$qb, |
|
|
|
$clauses, |
|
|
|
$boolean = 'AND' |
|
) |
| |
|
protected |
Process relationship pairs.
- Parameters
-
| QueryBuilder | $qb | Query builder |
| RelationshipWhereClause[] | $clauses | Where clauses |
| string | $boolean | Merge boolean |
- Returns
- CompositeExpression|string
Definition at line 333 of file River.php.
◆ buildQuery()
◆ buildRiverClause()
Process river properties.
- Parameters
-
- Returns
- CompositeExpression|mixed|null|string
Definition at line 241 of file River.php.
◆ calculate()
| Elgg\Database\River::calculate |
( |
|
$function, |
|
|
|
$property, |
|
|
|
$property_type = 'annotation' |
|
) |
| |
Performs a mathematical calculation on river annotations.
- Parameters
-
| string | $function | Valid numeric function |
| string | $property | Property name |
| string | $property_type | 'annotation' |
- Returns
- int|float
- Exceptions
-
Reimplemented from Elgg\Database\Repository.
Definition at line 98 of file River.php.
◆ count()
| Elgg\Database\River::count |
( |
| ) |
|
◆ execute()
| Elgg\Database\River::execute |
( |
| ) |
|
Execute the query resolving calculation, count and/or batch options.
- Returns
- array|\ElggData[]|\ElggEntity[]|int|\ElggBatch
- Exceptions
-
Reimplemented from Elgg\Database\Repository.
Definition at line 183 of file River.php.
◆ find()
| static Elgg\Database\River::find |
( |
array |
$options = [] | ) |
|
|
static |
Build and execute a new query from an array of legacy options.
- Parameters
-
- Returns
- \ElggRiverItem[]|int|mixed
Reimplemented from Elgg\Database\Repository.
Definition at line 68 of file River.php.
◆ get()
| Elgg\Database\River::get |
( |
|
$limit = null, |
|
|
|
$offset = null, |
|
|
|
$callback = null |
|
) |
| |
Fetch river items.
- Parameters
-
| int | $limit | Limit |
| int | $offset | Offset |
| callable | $callback | Custom callback |
- Returns
- \ElggEntity[]
Reimplemented from Elgg\Database\Repository.
Definition at line 132 of file River.php.
The documentation for this class was generated from the following file: