Method |
Description |
|
__construct ( string $model ) |
|
|
__toString ( ) : string |
Return the string representation of the query. |
|
compose_query ( boolean $only_count = false ) : string |
Compose the actual SQL query from all of our filters and options. |
|
find ( boolean $only_count = false ) : array |
Compose & execute our query. |
|
limit ( integer $limit ) : self |
Set the maximum number of results to return at once. |
|
offset ( integer $offset ) : self |
Set the offset to use when calculating results. |
|
order ( string $order ) : self |
Set the order we should sort by. |
|
search ( string $search_term ) : self |
Get models where any of the designated fields match the given value. |
|
set_primary_key ( string $primary_key ) |
Set the primary key column. |
|
set_searchable_fields ( array $fields ) |
Set the fields to include in the search. |
|
sort_by ( string $sort_by ) : self |
Set the column we should sort by. |
|
total_count ( ) : integer |
Runs the same query as find, but with no limit and don't retrieve the
results, just the total items found. |
|
where ( string $column, string $value ) : self |
Add a = clause to the search query. |
|
where_all ( array $where ) : self |
Add an AND statement to the where clause (e.g. (var1 = foo AND var2 = bar
AND var3 = baz)). |
|
where_any ( array $where ) : self |
Add an OR statement to the where clause (e.g. (var = foo OR var = bar OR
var = baz)). |
|
where_gt ( string $column, string $value ) : self |
Add a > clause to the search query. |
|
where_gte ( string $column, string $value ) : self |
Add a >= clause to the search query. |
|
where_in ( string $column, array $in ) : self |
Add an IN clause to the search query. |
|
where_like ( string $column, string $value ) : self |
Add a LIKE clause to the search query. |
|
where_lt ( string $column, string $value ) : self |
Add a < clause to the search query. |
|
where_lte ( string $column, string $value ) : self |
Add a <= clause to the search query. |
|
where_not ( string $column, string $value ) : self |
Add a != clause to the search query. |
|
where_not_in ( string $column, array $not_in ) : self |
Add a NOT IN clause to the search query. |
|
where_not_like ( string $column, string $value ) : self |
Add a NOT LIKE clause to the search query. |
|