PHP 클래스 System\Database\query

상속: extends System\Database\Builder
파일 보기 프로젝트 열기: anchorcms/anchor-cms

공개 프로퍼티들

프로퍼티 타입 설명
$bind array Array values to bind to the query
$columns array Array of columns to build the select
$connection object Database connector object
$fetch_class string The class name of the object to create when fetching from the database
$groupby array Columns to group by
$join array Array of table joins to build
$limit integer Number of rows to limit
$offset integer Number of rows to offset
$sortby array Columns to sort by
$table string The current database table
$where array Array of where clauses to build

공개 메소드들

메소드 설명
__construct ( $table, $connection = null ) Create a new database query instance
apply ( $class ) : object Set the class name for fetch queries, return self for chaining
column ( $columns = [], $column_number ) : string Fetch a single column from the query
count ( ) : string Run a count function on database query
delete ( ) : integer Delete a row in the database
fetch ( $columns = null ) : object Fetch a single row from the query
get ( $columns = null ) : object Fetch a result set from the query
group ( $column ) : object Add a group by column to the query
insert ( $row ) : object Insert a row into the database
insert_get_id ( $row ) : integer Insert a row into the database and return the inserted ID
join ( $table, $left, $operator, $right, $type = 'INNER' ) : object Add a table join to the query
left_join ( $table, $left, $operator, $right ) : object Add a left table join to the query
or_where ( $column, $operator, $value ) : object Add a where clause to the query starting with OR
skip ( $num ) : object Set a row offset on the query
sort ( $column, $mode = 'ASC' ) : object Add a sort by column to the query
table ( $table, $connection = null ) : object Create a new database query instance for chaining
take ( $num ) : object Set a row limit on the query
update ( $row ) : integer Update row in the database
where ( $column, $operator, $value ) : object Add a where clause to the query
where_in ( $column, $values ) : object Add a where clause to the query starting with IN

메소드 상세

__construct() 공개 메소드

Create a new database query instance
public __construct ( $table, $connection = null )

apply() 공개 메소드

Set the class name for fetch queries, return self for chaining
public apply ( $class ) : object
리턴 object

column() 공개 메소드

Fetch a single column from the query
public column ( $columns = [], $column_number ) : string
리턴 string

count() 공개 메소드

Run a count function on database query
public count ( ) : string
리턴 string

delete() 공개 메소드

Delete a row in the database
public delete ( ) : integer
리턴 integer

fetch() 공개 메소드

Fetch a single row from the query
public fetch ( $columns = null ) : object
리턴 object

get() 공개 메소드

Fetch a result set from the query
public get ( $columns = null ) : object
리턴 object

group() 공개 메소드

Add a group by column to the query
public group ( $column ) : object
리턴 object

insert() 공개 메소드

Insert a row into the database
public insert ( $row ) : object
리턴 object

insert_get_id() 공개 메소드

Insert a row into the database and return the inserted ID
public insert_get_id ( $row ) : integer
리턴 integer

join() 공개 메소드

Add a table join to the query
public join ( $table, $left, $operator, $right, $type = 'INNER' ) : object
리턴 object

left_join() 공개 메소드

Add a left table join to the query
public left_join ( $table, $left, $operator, $right ) : object
리턴 object

or_where() 공개 메소드

Add a where clause to the query starting with OR
public or_where ( $column, $operator, $value ) : object
리턴 object

skip() 공개 메소드

Set a row offset on the query
public skip ( $num ) : object
리턴 object

sort() 공개 메소드

Add a sort by column to the query
public sort ( $column, $mode = 'ASC' ) : object
리턴 object

table() 공개 정적인 메소드

Create a new database query instance for chaining
public static table ( $table, $connection = null ) : object
리턴 object Query

take() 공개 메소드

Set a row limit on the query
public take ( $num ) : object
리턴 object

update() 공개 메소드

Update row in the database
public update ( $row ) : integer
리턴 integer

where() 공개 메소드

Add a where clause to the query
public where ( $column, $operator, $value ) : object
리턴 object

where_in() 공개 메소드

Add a where clause to the query starting with IN
public where_in ( $column, $values ) : object
리턴 object

프로퍼티 상세

$bind 공개적으로 프로퍼티

Array values to bind to the query
public array $bind
리턴 array

$columns 공개적으로 프로퍼티

Array of columns to build the select
public array $columns
리턴 array

$connection 공개적으로 프로퍼티

Database connector object
public object $connection
리턴 object

$fetch_class 공개적으로 프로퍼티

The class name of the object to create when fetching from the database
public string $fetch_class
리턴 string

$groupby 공개적으로 프로퍼티

Columns to group by
public array $groupby
리턴 array

$join 공개적으로 프로퍼티

Array of table joins to build
public array $join
리턴 array

$limit 공개적으로 프로퍼티

Number of rows to limit
public int $limit
리턴 integer

$offset 공개적으로 프로퍼티

Number of rows to offset
public int $offset
리턴 integer

$sortby 공개적으로 프로퍼티

Columns to sort by
public array $sortby
리턴 array

$table 공개적으로 프로퍼티

The current database table
public string $table
리턴 string

$where 공개적으로 프로퍼티

Array of where clauses to build
public array $where
리턴 array