PHP 클래스 Mmanos\Search\Query

파일 보기 프로젝트 열기: mmanos/laravel-search 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$callbacks array Any user defined callback functions to help manipulate the raw query instance.
$callbacks_executed boolean Prevents multiple executions.
$columns array The columns that should be returned.
$conditions array The search conditions for the query.
$index Mmanos\Search\Index The search index instance.
$limit integer The maximum number of records to return.
$offset integer The number of records to skip.
$query mixed The raw query used by the current search index driver.

공개 메소드들

메소드 설명
__construct ( Mmanos\Search\Index $index ) : void Create a new search query builder instance.
addCallback ( Closure $callback, array | string $driver = null ) : Query Add a custom callback fn to be called just before the query is executed.
count ( ) : integer Execute the current query and return the total number of results.
delete ( ) : void Execute the current query and perform delete operations on each document found.
get ( ) : array Execute the current query and return the results.
limit ( integer $limit, integer $offset ) : Query Set the "limit" and "offset" value of the query.
paginate ( integer $num = 15 ) : Illuminate\Pagination\LengthAwarePaginator Execute the current query and return a paginator for the results.
search ( string $field, mixed $value, array $options = [] ) : Query Add a basic search clause to the query.
select ( array $columns = ['*'] ) : Query Set the columns to be selected.
where ( string $field, mixed $value ) : Query Add a basic where clause to the query. A where clause filter attemtps to match the value you specify as an entire "phrase". It does not guarantee an exact match of the entire field value.
whereLocation ( float $lat, float $long, integer $distance_in_meters = 10000 ) : Query Add a geo distance where clause to the query.

보호된 메소드들

메소드 설명
executeCallbacks ( ) : void Execute any callback functions. Only execute once.

메소드 상세

__construct() 공개 메소드

Create a new search query builder instance.
public __construct ( Mmanos\Search\Index $index ) : void
$index Mmanos\Search\Index
리턴 void

addCallback() 공개 메소드

Add a custom callback fn to be called just before the query is executed.
public addCallback ( Closure $callback, array | string $driver = null ) : Query
$callback Closure
$driver array | string
리턴 Query

count() 공개 메소드

Execute the current query and return the total number of results.
public count ( ) : integer
리턴 integer

delete() 공개 메소드

Execute the current query and perform delete operations on each document found.
public delete ( ) : void
리턴 void

executeCallbacks() 보호된 메소드

Execute any callback functions. Only execute once.
protected executeCallbacks ( ) : void
리턴 void

get() 공개 메소드

Execute the current query and return the results.
public get ( ) : array
리턴 array

limit() 공개 메소드

Set the "limit" and "offset" value of the query.
public limit ( integer $limit, integer $offset ) : Query
$limit integer
$offset integer
리턴 Query

paginate() 공개 메소드

Execute the current query and return a paginator for the results.
public paginate ( integer $num = 15 ) : Illuminate\Pagination\LengthAwarePaginator
$num integer
리턴 Illuminate\Pagination\LengthAwarePaginator

select() 공개 메소드

Set the columns to be selected.
public select ( array $columns = ['*'] ) : Query
$columns array
리턴 Query

where() 공개 메소드

Add a basic where clause to the query. A where clause filter attemtps to match the value you specify as an entire "phrase". It does not guarantee an exact match of the entire field value.
public where ( string $field, mixed $value ) : Query
$field string
$value mixed
리턴 Query

whereLocation() 공개 메소드

Add a geo distance where clause to the query.
public whereLocation ( float $lat, float $long, integer $distance_in_meters = 10000 ) : Query
$lat float
$long float
$distance_in_meters integer
리턴 Query

프로퍼티 상세

$callbacks 보호되어 있는 프로퍼티

Any user defined callback functions to help manipulate the raw query instance.
protected array $callbacks
리턴 array

$callbacks_executed 보호되어 있는 프로퍼티

Prevents multiple executions.
protected bool $callbacks_executed
리턴 boolean

$columns 보호되어 있는 프로퍼티

The columns that should be returned.
protected array $columns
리턴 array

$conditions 보호되어 있는 프로퍼티

The search conditions for the query.
protected array $conditions
리턴 array

$index 보호되어 있는 프로퍼티

The search index instance.
protected Index,Mmanos\Search $index
리턴 Mmanos\Search\Index

$limit 보호되어 있는 프로퍼티

The maximum number of records to return.
protected int $limit
리턴 integer

$offset 보호되어 있는 프로퍼티

The number of records to skip.
protected int $offset
리턴 integer

$query 보호되어 있는 프로퍼티

The raw query used by the current search index driver.
protected mixed $query
리턴 mixed