PHP Класс Xpressengine\Database\DynamicQuery

* Illuminate\Database\Query\Builder 를 extends 하여 기능 추가 * insert, update, delete, select 동작할 때 dynamic, proxy 사용여부에 따라 추가 기능 사용 * proxy 사용할 때 ProxyManager 에 등록된 Proxy 동작 * dynamic 을 사용하지 않으면 Illuminate Builder 직접 사용
Автор: XE Developers ([email protected])
Наследование: extends Illuminate\Database\Query\Builder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$connection Xpressengine\Database\VirtualConnectionInterface
$dynamic boolean dynamic query
$dynamicTables array dynamic query 사용하면서 join 된 테이블 정보
$options array ProxyManager 로 전달될 값 dynamic() 메소드를 이용할 경우 options 를 지정할 수 있음
$proxy boolean proxyManager 동작 여부 설정
$schemas array schema() 메소드를 통해 가져온 스키마 데이터
$table string
$targetName string A table 의 이름으로 처리하지 못하는 이유는 게시판 처럼 instanceId 로 처리하는 경우가 있기 때문 DynamicField 의 config targetName attribute value

Открытые методы

Метод Описание
count ( string $columns = '*' ) : array | static[] get list
delete ( mixed $id = null ) : integer Delete a record from the database.
find ( integer $id, array $columns = ['*'] ) : mixed | static Execute a query for a single record by ID.
first ( array $columns = ['*'] ) : mixed | static get first row
get ( array $columns = ['*'] ) : array | static[] get list
getDynamicTables ( ) : array get dynamic join table
getProxyManager ( ) : ProxyManager | null get proxy manager
getQuery ( ) : Builder get illuminate database query builder
hasDynamicTable ( string $table ) : boolean has dynamic join table
insert ( array $args ) : boolean insert data
insertGetId ( array $args, string $sequence = null ) : integer insert data and get id
paginate ( integer $perPage = 15, array $columns = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Paginate the given query into a simple paginator.
setDynamicTable ( string $table ) set dynamic join table information
setProxyOption ( array $options, boolean $merge = true ) proxy 를 위한 options 설정
simplePaginate ( integer $perPage = 15, array $columns = ['*'], string $pageName = 'page' ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Get a paginator only supporting simple next and previous links.
update ( array $args ) : integer update data
useDynamic ( boolean $use = true ) dynamic filter 처리 유무
useProxy ( boolean $use = true ) 프록시 처리 유무 설정

Приватные методы

Метод Описание
filter ( array $args, array $columns ) : array $args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.
schema ( ) : array get table schema

Описание методов

count() публичный метод

get list
public count ( string $columns = '*' ) : array | static[]
$columns string get columns list
Результат array | static[]

delete() публичный метод

Delete a record from the database.
public delete ( mixed $id = null ) : integer
$id mixed ID
Результат integer

find() публичный метод

Execute a query for a single record by ID.
public find ( integer $id, array $columns = ['*'] ) : mixed | static
$id integer ID
$columns array get columns
Результат mixed | static

first() публичный метод

get first row
public first ( array $columns = ['*'] ) : mixed | static
$columns array get columns list
Результат mixed | static

get() публичный метод

get list
public get ( array $columns = ['*'] ) : array | static[]
$columns array get columns list
Результат array | static[]

getDynamicTables() публичный метод

get dynamic join table
public getDynamicTables ( ) : array
Результат array

getProxyManager() публичный метод

get proxy manager
public getProxyManager ( ) : ProxyManager | null
Результат ProxyManager | null

getQuery() публичный метод

get illuminate database query builder
Устаревший:
public getQuery ( ) : Builder
Результат Illuminate\Database\Query\Builder

hasDynamicTable() публичный метод

has dynamic join table
public hasDynamicTable ( string $table ) : boolean
$table string table name
Результат boolean

insert() публичный метод

insert data
public insert ( array $args ) : boolean
$args array insert data
Результат boolean

insertGetId() публичный метод

insert data and get id
public insertGetId ( array $args, string $sequence = null ) : integer
$args array insert data
$sequence string sequence
Результат integer

paginate() публичный метод

Paginate the given query into a simple paginator.
public paginate ( integer $perPage = 15, array $columns = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$perPage integer count of list
$columns array get columns
$pageName string page parameter name
$page integer | null page number
Результат Illuminate\Contracts\Pagination\LengthAwarePaginator

setDynamicTable() публичный метод

set dynamic join table information
public setDynamicTable ( string $table )
$table string table name

setProxyOption() публичный метод

proxy 를 위한 options 설정
public setProxyOption ( array $options, boolean $merge = true )
$options array proxy option
$merge boolean merge options or not

simplePaginate() публичный метод

This is more efficient on larger data-sets, etc.
public simplePaginate ( integer $perPage = 15, array $columns = ['*'], string $pageName = 'page' ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$perPage integer count of list
$columns array get columns
$pageName string page parameter name
Результат Illuminate\Contracts\Pagination\LengthAwarePaginator

update() публичный метод

update data
public update ( array $args ) : integer
$args array update data
Результат integer

useDynamic() публичный метод

dynamic filter 처리 유무
public useDynamic ( boolean $use = true )
$use boolean use dynamic flag

useProxy() публичный метод

프록시 처리 유무 설정
public useProxy ( boolean $use = true )
$use boolean proxy use

Описание свойств

$connection защищенное свойство

protected VirtualConnectionInterface,Xpressengine\Database $connection
Результат Xpressengine\Database\VirtualConnectionInterface

$dynamic защищенное свойство

dynamic query
protected bool $dynamic
Результат boolean

$dynamicTables защищенное свойство

dynamic query 사용하면서 join 된 테이블 정보
protected array $dynamicTables
Результат array

$options защищенное свойство

ProxyManager 로 전달될 값 dynamic() 메소드를 이용할 경우 options 를 지정할 수 있음
protected array $options
Результат array

$proxy защищенное свойство

proxyManager 동작 여부 설정
protected bool $proxy
Результат boolean

$schemas защищенное свойство

schema() 메소드를 통해 가져온 스키마 데이터
protected array $schemas
Результат array

$table защищенное свойство

protected string $table
Результат string

$targetName защищенное свойство

A table 의 이름으로 처리하지 못하는 이유는 게시판 처럼 instanceId 로 처리하는 경우가 있기 때문 DynamicField 의 config targetName attribute value
protected string $targetName
Результат string