Builder extends Builder
UserFrosting's custom Query Builder Class.
Tags
Table of Contents
$excludedColumns | array | |
---|---|---|
beginsWith() | Perform a "begins with" pattern match on a specified column in a query. | self |
endsWith() | Perform an "ends with" pattern match on a specified column in a query. | self |
exclude() | Add columns to be excluded from the query. | self |
like() | Perform a pattern match on a specified column in a query. | self |
orLike() | Perform a pattern match on a specified column in a query. | self |
get() | Execute the query as a "select" statement. | Collection |
removeExcludedSelectColumns() | Remove excluded columns from the select column list. | mixed |
replaceWildcardColumns() | Find any wildcard columns ('*'), remove it from the column list and replace with an explicit list of columns. | array |
findWildcardTables() | Return a list of wildcard columns from the list of columns, mapping columns to their corresponding tables. | array |
getQualifiedColumnNames() | Gets the fully qualified column names for a specified table. | array |
convertColumnsToFullyQualified() | Fully qualify any unqualified columns in a list with this builder's table name. | array |
Properties
$excludedColumns
protected
array
$excludedColumns
= null
Methods
beginsWith()
Perform a "begins with" pattern match on a specified column in a query.
public
beginsWith(
$field :
string
, $value :
string
)
: self
Parameters
- $field : string
The column to match
- $value : string
The value to match
Return values
selfendsWith()
Perform an "ends with" pattern match on a specified column in a query.
public
endsWith(
$field :
string
, $value :
string
)
: self
Parameters
- $field : string
The column to match
- $value : string
The value to match
Return values
selfexclude()
Add columns to be excluded from the query.
public
exclude(
$column :
array|string
)
: self
Parameters
- $column : array|string
The column(s) to exclude
Return values
selflike()
Perform a pattern match on a specified column in a query.
public
like(
$field :
string
, $value :
string
)
: self
Parameters
- $field : string
The column to match
- $value : string
The value to match
Return values
selforLike()
Perform a pattern match on a specified column in a query.
public
orLike(
$field :
string
, $value :
string
)
: self
Parameters
- $field : string
The column to match
- $value : string
The value to match
Return values
selfget()
Execute the query as a "select" statement.
public
get(
[ $columns :
array
= ['*'] ]
)
: Collection
Parameters
- $columns : array = ['*']
Return values
CollectionremoveExcludedSelectColumns()
Remove excluded columns from the select column list.
protected
removeExcludedSelectColumns(
)
: mixed
Return values
mixedreplaceWildcardColumns()
Find any wildcard columns ('*'), remove it from the column list and replace with an explicit list of columns.
protected
replaceWildcardColumns(
$columns :
array
)
: array
Parameters
- $columns : array
Return values
arrayfindWildcardTables()
Return a list of wildcard columns from the list of columns, mapping columns to their corresponding tables.
protected
findWildcardTables(
$columns :
array
)
: array
Parameters
- $columns : array
Return values
arraygetQualifiedColumnNames()
Gets the fully qualified column names for a specified table.
protected
getQualifiedColumnNames(
[ $table :
string
= null ]
)
: array
Parameters
- $table : string = null
Return values
arrayconvertColumnsToFullyQualified()
Fully qualify any unqualified columns in a list with this builder's table name.
protected
convertColumnsToFullyQualified(
$columns :
array
[, $table :
string
= null ]
)
: array
Parameters
- $columns : array
- $table : string = null