Open Data Catalog v2.0.0
Drupal\dkan_datastore\Storage\Query Class Reference
Inheritance diagram for Drupal\dkan_datastore\Storage\Query:

Public Member Functions

 setThingToRetrieve ($id)
 
 filterByProperty ($property)
 
 conditionByIsEqualTo (string $property, string $value)
 
 limitTo (int $number_of_items)
 
 offsetBy (int $offset)
 
 sortByAscending (string $property)
 
 sortByDescending (string $property)
 
 count ()
 

Public Attributes

 $thing
 
 $properties = []
 
 $conditions = []
 
 $sort = ['ASC' => [], 'DESC' => []]
 
 $limit = NULL
 
 $offset = NULL
 
 $count = FALSE
 

Detailed Description

Query class.

Definition at line 13 of file Query.php.

Member Function Documentation

◆ conditionByIsEqualTo()

Drupal\dkan_datastore\Storage\Query::conditionByIsEqualTo ( string  $property,
string  $value 
)

Retrieve only objects with properties of certain values.

Definition at line 47 of file Query.php.

◆ count()

Drupal\dkan_datastore\Storage\Query::count ( )

Mark query as a count query.

Definition at line 82 of file Query.php.

◆ filterByProperty()

Drupal\dkan_datastore\Storage\Query::filterByProperty (   $property)

Properties to be retrieved.

Definition at line 40 of file Query.php.

◆ limitTo()

Drupal\dkan_datastore\Storage\Query::limitTo ( int  $number_of_items)

Get a specific number of records.

Definition at line 54 of file Query.php.

◆ offsetBy()

Drupal\dkan_datastore\Storage\Query::offsetBy ( int  $offset)

Offset where we start getting records.

Definition at line 61 of file Query.php.

◆ setThingToRetrieve()

Drupal\dkan_datastore\Storage\Query::setThingToRetrieve (   $id)

Set the identifier of what is being retrieved.

In the case of things being retrieved from a SQL database, a table name would be the identifier.

Definition at line 33 of file Query.php.

◆ sortByAscending()

Drupal\dkan_datastore\Storage\Query::sortByAscending ( string  $property)

Sort records by the given property in ascending order.

Definition at line 68 of file Query.php.

◆ sortByDescending()

Drupal\dkan_datastore\Storage\Query::sortByDescending ( string  $property)

Sort records by the given property in descending order.

Definition at line 75 of file Query.php.

Member Data Documentation

◆ $conditions

Drupal\dkan_datastore\Storage\Query::$conditions = []

Definition at line 21 of file Query.php.

◆ $count

Drupal\dkan_datastore\Storage\Query::$count = FALSE

Definition at line 25 of file Query.php.

◆ $limit

Drupal\dkan_datastore\Storage\Query::$limit = NULL

Definition at line 23 of file Query.php.

◆ $offset

Drupal\dkan_datastore\Storage\Query::$offset = NULL

Definition at line 24 of file Query.php.

◆ $properties

Drupal\dkan_datastore\Storage\Query::$properties = []

Definition at line 20 of file Query.php.

◆ $sort

Drupal\dkan_datastore\Storage\Query::$sort = ['ASC' => [], 'DESC' => []]

Definition at line 22 of file Query.php.

◆ $thing

Drupal\dkan_datastore\Storage\Query::$thing

Definition at line 19 of file Query.php.