Relationships repository contains methods for fetching relationships from database or performing calculations on relationship properties.
More...
|
| calculate ($function, $property, $property_type=null) |
|
| count () |
|
| execute () |
|
| get ($limit=null, $offset=null, $callback=null) |
|
| __construct (array $options=[]) |
| Constructor. More...
|
|
| __get ($name) |
| {} More...
|
|
| __set ($name, $value) |
| {} More...
|
|
| __unset ($name) |
| {} More...
|
|
| __isset ($name) |
| {} More...
|
|
| count () |
| Count rows. More...
|
|
| calculate ($function, $property, $property_type=null) |
| Apply numeric calculation to a column. More...
|
|
| get ($limit=null, $offset=null, $callback=null) |
| Fetch rows. More...
|
|
| batch ($limit=null, $offset=null, $callback=null) |
| Fetch rows as an ElggBatch. More...
|
|
| execute () |
| Apply correct execution method based on calculation, count or other criteria. 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...
|
|
Relationships repository contains methods for fetching relationships from database or performing calculations on relationship properties.
- Since
- 3.2
Definition at line 21 of file Relationships.php.
Elgg\Database\Relationships::buildEntityClause |
( |
QueryBuilder |
$qb | ) |
|
|
protected |
Process entity attribute wheres Joins entities table on guid_one|guid_two in relationships table and applies where clauses.
- Parameters
-
- Returns
- |CompositeExpression|mixed|null|string
Definition at line 213 of file Relationships.php.
Elgg\Database\Relationships::buildPairedAnnotationClause |
( |
QueryBuilder |
$qb, |
|
|
|
$clauses, |
|
|
|
$boolean = 'AND' |
|
) |
| |
|
protected |
Process annotation name value pairs Joins the annotation table on guid_one|guid_two in relationships 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 258 of file Relationships.php.
Elgg\Database\Relationships::buildPairedMetadataClause |
( |
QueryBuilder |
$qb, |
|
|
|
$clauses, |
|
|
|
$boolean = 'AND' |
|
) |
| |
|
protected |
Process metadata name value pairs Joins the metadata table on guid_one|guid_two in relationships table and applies metadata where clauses.
- Parameters
-
QueryBuilder | $qb | Query builder |
| MetadataWhereClause[] | $clauses Where clauses |
string | $boolean | Merge boolean |
- Returns
- CompositeExpression|string
Definition at line 228 of file Relationships.php.
Elgg\Database\Relationships::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 285 of file Relationships.php.
Elgg\Database\Relationships::calculate |
( |
|
$function, |
|
|
|
$property, |
|
|
|
$property_type = null |
|
) |
| |
Elgg\Database\Relationships::count |
( |
| ) |
|
Elgg\Database\Relationships::execute |
( |
| ) |
|
Elgg\Database\Relationships::get |
( |
|
$limit = null , |
|
|
|
$offset = null , |
|
|
|
$callback = null |
|
) |
| |
Elgg\Database\Relationships::getJoinColumn |
( |
| ) |
|
|
protected |
Return the base column to use in joins.
- Returns
- string
Definition at line 300 of file Relationships.php.
The documentation for this class was generated from the following file: