Query class.
Definition at line 13 of file Query.php.
◆ conditionByIsEqualTo()
Drupal\common\Storage\Query::conditionByIsEqualTo |
( |
string |
$property, |
|
|
string |
$value |
|
) |
| |
Retrieve only objects with properties of certain values.
- Parameters
-
string | $property | Property to filter on. |
string | $value | Property value to filter against. |
Definition at line 123 of file Query.php.
◆ count()
Drupal\common\Storage\Query::count |
( |
| ) |
|
Mark query as a count query.
Note - for now, leaves limit/offset alone.
Definition at line 182 of file Query.php.
◆ filterByProperty()
Drupal\common\Storage\Query::filterByProperty |
( |
|
$property | ) |
|
Add a single property to the properties being retrieved.
- Parameters
-
string | $property | The name of a property, such as a column from a db table. |
Definition at line 111 of file Query.php.
◆ limitTo()
Drupal\common\Storage\Query::limitTo |
( |
int |
$number_of_items | ) |
|
Set the maximum number of records to return.
- Parameters
-
int | $number_of_items | Number of items. |
Definition at line 137 of file Query.php.
◆ offsetBy()
Drupal\common\Storage\Query::offsetBy |
( |
int |
$offset | ) |
|
Offset where we start getting records.
- Parameters
-
int | $offset | Number of records to offset by before retrieving. |
Definition at line 147 of file Query.php.
◆ setCollectionToRetrieve()
Drupal\common\Storage\Query::setCollectionToRetrieve |
( |
|
$id | ) |
|
Set the identifier of what is being retrieved.
- Parameters
-
string | $id | Identifier of collection. When working with an SQL database, this would be the table name. |
Definition at line 101 of file Query.php.
◆ sortByAscending()
Drupal\common\Storage\Query::sortByAscending |
( |
string |
$property | ) |
|
Sort records by the given property in ascending order.
- Parameters
-
string | $property | Property to sort by in ascending order. |
Definition at line 157 of file Query.php.
◆ sortByDescending()
Drupal\common\Storage\Query::sortByDescending |
( |
string |
$property | ) |
|
Sort records by the given property in descending order.
- Parameters
-
string | $property | Property to sort by in descending order. |
Definition at line 170 of file Query.php.
◆ $collection
Drupal\common\Storage\Query::$collection |
◆ $conditions
Drupal\common\Storage\Query::$conditions = [] |
◆ $count
Drupal\common\Storage\Query::$count = FALSE |
◆ $joins
Drupal\common\Storage\Query::$joins = [] |
◆ $limit
Drupal\common\Storage\Query::$limit = 500 |
◆ $offset
Drupal\common\Storage\Query::$offset = 0 |
◆ $properties
Drupal\common\Storage\Query::$properties = [] |
◆ $showDbColumns
Drupal\common\Storage\Query::$showDbColumns = FALSE |
◆ $sorts
Drupal\common\Storage\Query::$sorts = [] |