PHP Класс Miner

Hardware/CPU Module for LoadAvg
Автор: Karsten Becker
Наследование: extends Logger
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( PDO $PdoConnection = null, boolean $autoQuote = true ) : Miner Constructor.
__toString ( ) : string Get the full SQL statement without value placeholders.
andHaving ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner Add an AND HAVING condition.
andWhere ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner Add an AND WHERE condition.
autoQuote ( mixed $value, boolean | null $override = null ) : mixed | false Safely escape a value if auto-quoting is enabled, or do nothing if disabled.
calcFoundRows ( ) : Miner Add SQL_CALC_FOUND_ROWS execution option.
closeHaving ( ) : Miner Add a closing bracket for nesting HAVING conditions.
closeWhere ( ) : Miner Add a closing bracket for nesting WHERE conditions.
delete ( string | false $table = false ) : Miner Add a table to DELETE from, or false if deleting from the FROM table.
distinct ( ) : Miner Add DISTINCT execution option.
execute ( ) : PDOStatement | false Execute the statement using the PDO database connection.
from ( string $table, string $alias = null ) : Miner Set the FROM table with optional alias.
getAutoQuote ( boolean | null $override = null ) : boolean Get whether values will be automatically escaped.
getDeleteString ( boolean $includeText = true ) : string Get the DELETE portion of the statement as a string.
getFrom ( ) : string Get the FROM table.
getFromAlias ( ) : string Get the FROM table alias.
getFromString ( boolean $includeText = true ) : string Get the FROM portion of the statement, including all JOINs, as a string.
getGroupByString ( boolean $includeText = true ) : string Get the GROUP BY portion of the statement as a string.
getHavingPlaceholderValues ( ) : array Get the HAVING placeholder values.
getHavingString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string Get the HAVING portion of the statement as a string.
getInsert ( ) : string Get the INSERT table.
getInsertString ( boolean $includeText = true ) : string Get the INSERT portion of the statement as a string.
getJoinString ( ) : string Get the JOIN portion of the statement as a string.
getLimit ( ) : integer | string Get the LIMIT on number of rows to return.
getLimitOffset ( ) : integer | string Get the LIMIT row number to start at.
getLimitString ( boolean $includeText = true ) : string Get the LIMIT portion of the statement as a string.
getOptionsString ( boolean $includeTrailingSpace = false ) : string Get the execution options portion of the statement as a string.
getOrderByString ( boolean $includeText = true ) : string Get the ORDER BY portion of the statement as a string.
getPdoConnection ( ) : PDO | null Get the PDO database connection to use in executing this statement.
getPlaceholderValues ( ) : array Get all placeholder values (SET, WHERE, and HAVING).
getReplace ( ) : string Get the REPLACE table.
getReplaceString ( boolean $includeText = true ) : string Get the REPLACE portion of the statement as a string.
getSelectString ( boolean $includeText = true ) : string Get the SELECT portion of the statement as a string.
getSetPlaceholderValues ( ) : array Get the SET placeholder values.
getSetString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string Get the SET portion of the statement as a string.
getStatement ( boolean $usePlaceholders = true ) : string Get the full SQL statement.
getUpdate ( ) : string Get the UPDATE table.
getUpdateString ( boolean $includeText = true ) : string Get the UPDATE portion of the statement as a string.
getWherePlaceholderValues ( ) : array Get the WHERE placeholder values.
getWhereString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string Get the WHERE portion of the statement as a string.
groupBy ( string $column, string | null $order = null ) : Miner Add a GROUP BY column.
having ( string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a HAVING condition.
havingBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a BETWEEN HAVING condition.
havingIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add an IN WHERE condition.
havingNotBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT BETWEEN HAVING condition.
havingNotIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT IN HAVING condition.
innerJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner Add an INNER JOIN table with optional ON criteria.
insert ( string $table ) : Miner Set the INSERT table.
isDelete ( ) : boolean Whether this is a DELETE statement.
isInsert ( ) : boolean Whether this is an INSERT statement.
isReplace ( ) : boolean Whether this is a REPLACE statement.
isSelect ( ) : boolean Whether this is a SELECT statement.
isUpdate ( ) : boolean Whether this is an UPDATE statement.
join ( string $table, string | array $criteria = null, string $type = self::INNER_JOIN, string $alias = null ) : Miner Add a JOIN table with optional ON criteria.
leftJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner Add a LEFT JOIN table with optional ON criteria.
limit ( integer | string $limit, integer | string $offset ) : Miner Set the LIMIT on number of rows to return with optional offset.
mergeDeleteInto ( Miner $Miner ) : Miner Merge this Miner's DELETE into the given Miner.
mergeFromInto ( Miner $Miner ) : Miner Merge this Miner's FROM into the given Miner.
mergeGroupByInto ( Miner $Miner ) : Miner Merge this Miner's GROUP BY into the given Miner.
mergeHavingInto ( Miner $Miner ) : Miner Merge this Miner's HAVING into the given Miner.
mergeInsertInto ( Miner $Miner ) : Miner Merge this Miner's INSERT into the given Miner.
mergeInto ( Miner $Miner, boolean $overrideLimit = true ) : Miner Merge this Miner into the given Miner.
mergeJoinInto ( Miner $Miner ) : Miner Merge this Miner's JOINs into the given Miner.
mergeLimitInto ( Miner $Miner ) : Miner Merge this Miner's LIMIT into the given Miner.
mergeOptionsInto ( Miner $Miner ) : Miner Merge this Miner's execution options into the given Miner.
mergeOrderByInto ( Miner $Miner ) : Miner Merge this Miner's ORDER BY into the given Miner.
mergeReplaceInto ( Miner $Miner ) : Miner Merge this Miner's REPLACE into the given Miner.
mergeSelectInto ( Miner $Miner ) : Miner Merge this Miner's SELECT into the given Miner.
mergeSetInto ( Miner $Miner ) : Miner Merge this Miner's SET into the given Miner.
mergeUpdateInto ( Miner $Miner ) : Miner Merge this Miner's UPDATE into the given Miner.
mergeWhereInto ( Miner $Miner ) : Miner Merge this Miner's WHERE into the given Miner.
openHaving ( string $connector = self::LOGICAL_AND ) : Miner Add an open bracket for nesting HAVING conditions.
openWhere ( string $connector = self::LOGICAL_AND ) : Miner Add an open bracket for nesting WHERE conditions.
option ( string $option ) : Miner Add an execution option like DISTINCT or SQL_CALC_FOUND_ROWS.
orHaving ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner Add an OR HAVING condition.
orWhere ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner Add an OR WHERE condition.
orderBy ( string $column, string $order = self::ORDER_BY_ASC ) : Miner Add a column to ORDER BY.
quote ( mixed $value ) : mixed | false Safely escape a value for use in a statement.
replace ( string $table ) : Miner Set the REPLACE table.
rightJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner Add a RIGHT JOIN table with optional ON criteria.
select ( string $column, string $alias = null ) : Miner Add a SELECT column, table, or expression with optional alias.
set ( string | array $column, mixed | null $value = null, boolean | null $quote = null ) : Miner Add one or more column values to INSERT, UPDATE, or REPLACE.
setAutoQuote ( boolean | null $autoQuote ) : Miner Set whether to automatically escape values.
setPdoConnection ( PDO $PdoConnection = null ) : Miner Set the PDO database connection to use in executing this statement.
update ( string $table ) : Miner Set the UPDATE table.
values ( array $values ) : Miner Add an array of columns => values to INSERT, UPDATE, or REPLACE.
where ( string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a WHERE condition.
whereBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a BETWEEN WHERE condition.
whereIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add an IN WHERE condition.
whereNotBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT BETWEEN WHERE condition.
whereNotIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT IN WHERE condition.

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

Метод Описание
closeCriteria ( array &$criteria ) : Miner Add a closing bracket for nesting conditions to the specified WHERE or HAVING criteria.
criteria ( array &$criteria, string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a condition to the specified WHERE or HAVING criteria.
criteriaBetween ( array &$criteria, string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a BETWEEN condition to the specified WHERE or HAVING criteria.
criteriaIn ( array &$criteria, string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add an IN condition to the specified WHERE or HAVING criteria.
criteriaNotBetween ( array &$criteria, string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT BETWEEN condition to the specified WHERE or HAVING criteria.
criteriaNotIn ( array &$criteria, string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner Add a NOT IN condition to the specified WHERE or HAVING criteria.
getCriteriaString ( array &$criteria, boolean $usePlaceholders = true, array &$placeholderValues = [] ) : string Get the WHERE or HAVING portion of the statement as a string.
getDeleteStatement ( boolean $usePlaceholders = true ) : string Get the full DELETE statement.
getInsertStatement ( boolean $usePlaceholders = true ) : string Get the full INSERT statement.
getJoinCriteriaUsingPreviousTable ( integer $joinIndex, string $table, string $column ) : string Get an ON criteria string joining the specified table and column to the same column of the previous JOIN or FROM table.
getReplaceStatement ( boolean $usePlaceholders = true ) : string Get the full REPLACE statement.
getSelectStatement ( boolean $usePlaceholders = true ) : string Get the full SELECT statement.
getUpdateStatement ( boolean $usePlaceholders = true ) : string Get the full UPDATE statement.
isDeleteTableFrom ( ) : boolean Whether the FROM table is the single table to delete from.
isJoinUnique ( string $table, string $alias ) : boolean Whether the join table and alias is unique (hasn't already been joined).
openCriteria ( array &$criteria, string $connector = self::LOGICAL_AND ) : Miner Add an open bracket for nesting conditions to the specified WHERE or HAVING criteria.
orCriteria ( array &$criteria, string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner Add an OR condition to the specified WHERE or HAVING criteria.

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

__construct() публичный Метод

Constructor.
public __construct ( PDO $PdoConnection = null, boolean $autoQuote = true ) : Miner
$PdoConnection PDO optional PDO database connection
$autoQuote boolean optional auto-escape values, default true
Результат Miner

__toString() публичный Метод

Get the full SQL statement without value placeholders.
public __toString ( ) : string
Результат string full SQL statement

andHaving() публичный Метод

Add an AND HAVING condition.
public andHaving ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner
$column string colum name
$value mixed value
$operator string optional comparison operator, default =
$quote boolean | null optional auto-escape value, default to global
Результат Miner

andWhere() публичный Метод

Add an AND WHERE condition.
public andWhere ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner
$column string colum name
$value mixed value
$operator string optional comparison operator, default =
$quote boolean | null optional auto-escape value, default to global
Результат Miner

autoQuote() публичный Метод

The $override parameter is for convenience in checking if a specific value should be quoted differently than the rest. 'null' defers to the global setting.
public autoQuote ( mixed $value, boolean | null $override = null ) : mixed | false
$value mixed value to escape (or not)
$override boolean | null value-specific override for convenience
Результат mixed | false value (escaped or original) or false if failed

calcFoundRows() публичный Метод

Add SQL_CALC_FOUND_ROWS execution option.
public calcFoundRows ( ) : Miner
Результат Miner

closeHaving() публичный Метод

Add a closing bracket for nesting HAVING conditions.
public closeHaving ( ) : Miner
Результат Miner

closeWhere() публичный Метод

Add a closing bracket for nesting WHERE conditions.
public closeWhere ( ) : Miner
Результат Miner

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

Add a table to DELETE from, or false if deleting from the FROM table.
public delete ( string | false $table = false ) : Miner
$table string | false optional table name, default false
Результат Miner

distinct() публичный Метод

Add DISTINCT execution option.
public distinct ( ) : Miner
Результат Miner

execute() публичный Метод

Execute the statement using the PDO database connection.
public execute ( ) : PDOStatement | false
Результат PDOStatement | false executed statement or false if failed

from() публичный Метод

Set the FROM table with optional alias.
public from ( string $table, string $alias = null ) : Miner
$table string table name
$alias string optional alias
Результат Miner

getAutoQuote() публичный Метод

The $override parameter is for convenience in checking if a specific value should be quoted differently than the rest. 'null' defers to the global setting.
public getAutoQuote ( boolean | null $override = null ) : boolean
$override boolean | null value-specific override for convenience
Результат boolean

getDeleteString() публичный Метод

Get the DELETE portion of the statement as a string.
public getDeleteString ( boolean $includeText = true ) : string
$includeText boolean optional include 'DELETE' text, default true
Результат string DELETE portion of the statement

getFrom() публичный Метод

Get the FROM table.
public getFrom ( ) : string
Результат string FROM table

getFromAlias() публичный Метод

Get the FROM table alias.
public getFromAlias ( ) : string
Результат string FROM table alias

getFromString() публичный Метод

Get the FROM portion of the statement, including all JOINs, as a string.
public getFromString ( boolean $includeText = true ) : string
$includeText boolean optional include 'FROM' text, default true
Результат string FROM portion of the statement

getGroupByString() публичный Метод

Get the GROUP BY portion of the statement as a string.
public getGroupByString ( boolean $includeText = true ) : string
$includeText boolean optional include 'GROUP BY' text, default true
Результат string GROUP BY portion of the statement

getHavingPlaceholderValues() публичный Метод

Get the HAVING placeholder values.
public getHavingPlaceholderValues ( ) : array
Результат array HAVING placeholder values

getHavingString() публичный Метод

Get the HAVING portion of the statement as a string.
public getHavingString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string
$usePlaceholders boolean optional use ? placeholders, default true
$includeText boolean optional include 'HAVING' text, default true
Результат string HAVING portion of the statement

getInsert() публичный Метод

Get the INSERT table.
public getInsert ( ) : string
Результат string INSERT table

getInsertString() публичный Метод

Get the INSERT portion of the statement as a string.
public getInsertString ( boolean $includeText = true ) : string
$includeText boolean optional include 'INSERT' text, default true
Результат string INSERT portion of the statement

getJoinString() публичный Метод

Get the JOIN portion of the statement as a string.
public getJoinString ( ) : string
Результат string JOIN portion of the statement

getLimit() публичный Метод

Get the LIMIT on number of rows to return.
public getLimit ( ) : integer | string
Результат integer | string LIMIT on number of rows to return

getLimitOffset() публичный Метод

Get the LIMIT row number to start at.
public getLimitOffset ( ) : integer | string
Результат integer | string LIMIT row number to start at

getLimitString() публичный Метод

Get the LIMIT portion of the statement as a string.
public getLimitString ( boolean $includeText = true ) : string
$includeText boolean optional include 'LIMIT' text, default true
Результат string LIMIT portion of the statement

getOptionsString() публичный Метод

Get the execution options portion of the statement as a string.
public getOptionsString ( boolean $includeTrailingSpace = false ) : string
$includeTrailingSpace boolean optional include space after options
Результат string execution options portion of the statement

getOrderByString() публичный Метод

Get the ORDER BY portion of the statement as a string.
public getOrderByString ( boolean $includeText = true ) : string
$includeText boolean optional include 'ORDER BY' text, default true
Результат string ORDER BY portion of the statement

getPdoConnection() публичный Метод

Get the PDO database connection to use in executing this statement.
public getPdoConnection ( ) : PDO | null
Результат PDO | null

getPlaceholderValues() публичный Метод

Get all placeholder values (SET, WHERE, and HAVING).
public getPlaceholderValues ( ) : array
Результат array all placeholder values

getReplace() публичный Метод

Get the REPLACE table.
public getReplace ( ) : string
Результат string REPLACE table

getReplaceString() публичный Метод

Get the REPLACE portion of the statement as a string.
public getReplaceString ( boolean $includeText = true ) : string
$includeText boolean optional include 'REPLACE' text, default true
Результат string REPLACE portion of the statement

getSelectString() публичный Метод

Get the SELECT portion of the statement as a string.
public getSelectString ( boolean $includeText = true ) : string
$includeText boolean optional include 'SELECT' text, default true
Результат string SELECT portion of the statement

getSetPlaceholderValues() публичный Метод

Get the SET placeholder values.
public getSetPlaceholderValues ( ) : array
Результат array SET placeholder values

getSetString() публичный Метод

Get the SET portion of the statement as a string.
public getSetString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string
$usePlaceholders boolean optional use ? placeholders, default true
$includeText boolean optional include 'SET' text, default true
Результат string SET portion of the statement

getStatement() публичный Метод

Get the full SQL statement.
public getStatement ( boolean $usePlaceholders = true ) : string
$usePlaceholders boolean optional use ? placeholders, default true
Результат string full SQL statement

getUpdate() публичный Метод

Get the UPDATE table.
public getUpdate ( ) : string
Результат string UPDATE table

getUpdateString() публичный Метод

Get the UPDATE portion of the statement as a string.
public getUpdateString ( boolean $includeText = true ) : string
$includeText boolean optional include 'UPDATE' text, default true
Результат string UPDATE portion of the statement

getWherePlaceholderValues() публичный Метод

Get the WHERE placeholder values.
public getWherePlaceholderValues ( ) : array
Результат array WHERE placeholder values

getWhereString() публичный Метод

Get the WHERE portion of the statement as a string.
public getWhereString ( boolean $usePlaceholders = true, boolean $includeText = true ) : string
$usePlaceholders boolean optional use ? placeholders, default true
$includeText boolean optional include 'WHERE' text, default true
Результат string WHERE portion of the statement

groupBy() публичный Метод

Add a GROUP BY column.
public groupBy ( string $column, string | null $order = null ) : Miner
$column string column name
$order string | null optional order direction, default none
Результат Miner

having() публичный Метод

Add a HAVING condition.
public having ( string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string colum name
$value mixed value
$operator string optional comparison operator, default =
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

havingBetween() публичный Метод

Add a BETWEEN HAVING condition.
public havingBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$min mixed minimum value
$max mixed maximum value
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

havingIn() публичный Метод

Add an IN WHERE condition.
public havingIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$values array values
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

havingNotBetween() публичный Метод

Add a NOT BETWEEN HAVING condition.
public havingNotBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$min mixed minimum value
$max mixed maximum value
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

havingNotIn() публичный Метод

Add a NOT IN HAVING condition.
public havingNotIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$values array values
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

innerJoin() публичный Метод

Add an INNER JOIN table with optional ON criteria.
public innerJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner
$table string table name
$criteria string | array optional ON criteria
$alias string optional alias
Результат Miner

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

Set the INSERT table.
public insert ( string $table ) : Miner
$table string INSERT table
Результат Miner

isDelete() публичный Метод

Whether this is a DELETE statement.
public isDelete ( ) : boolean
Результат boolean whether this is a DELETE statement

isInsert() публичный Метод

Whether this is an INSERT statement.
public isInsert ( ) : boolean
Результат boolean whether this is an INSERT statement

isReplace() публичный Метод

Whether this is a REPLACE statement.
public isReplace ( ) : boolean
Результат boolean whether this is a REPLACE statement

isSelect() публичный Метод

Whether this is a SELECT statement.
public isSelect ( ) : boolean
Результат boolean whether this is a SELECT statement

isUpdate() публичный Метод

Whether this is an UPDATE statement.
public isUpdate ( ) : boolean
Результат boolean whether this is an UPDATE statement

join() публичный Метод

Add a JOIN table with optional ON criteria.
public join ( string $table, string | array $criteria = null, string $type = self::INNER_JOIN, string $alias = null ) : Miner
$table string table name
$criteria string | array optional ON criteria
$type string optional type of join, default INNER JOIN
$alias string optional alias
Результат Miner

leftJoin() публичный Метод

Add a LEFT JOIN table with optional ON criteria.
public leftJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner
$table string table name
$criteria string | array optional ON criteria
$alias string optional alias
Результат Miner

limit() публичный Метод

Set the LIMIT on number of rows to return with optional offset.
public limit ( integer | string $limit, integer | string $offset ) : Miner
$limit integer | string number of rows to return
$offset integer | string optional row number to start at, default 0
Результат Miner

mergeDeleteInto() публичный Метод

Merge this Miner's DELETE into the given Miner.
public mergeDeleteInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeFromInto() публичный Метод

Merge this Miner's FROM into the given Miner.
public mergeFromInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeGroupByInto() публичный Метод

Merge this Miner's GROUP BY into the given Miner.
public mergeGroupByInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeHavingInto() публичный Метод

Merge this Miner's HAVING into the given Miner.
public mergeHavingInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeInsertInto() публичный Метод

Merge this Miner's INSERT into the given Miner.
public mergeInsertInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeInto() публичный Метод

Merge this Miner into the given Miner.
public mergeInto ( Miner $Miner, boolean $overrideLimit = true ) : Miner
$Miner Miner to merge into
$overrideLimit boolean optional override limit, default true
Результат Miner

mergeJoinInto() публичный Метод

Merge this Miner's JOINs into the given Miner.
public mergeJoinInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeLimitInto() публичный Метод

Merge this Miner's LIMIT into the given Miner.
public mergeLimitInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeOptionsInto() публичный Метод

Merge this Miner's execution options into the given Miner.
public mergeOptionsInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeOrderByInto() публичный Метод

Merge this Miner's ORDER BY into the given Miner.
public mergeOrderByInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeReplaceInto() публичный Метод

Merge this Miner's REPLACE into the given Miner.
public mergeReplaceInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeSelectInto() публичный Метод

Merge this Miner's SELECT into the given Miner.
public mergeSelectInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeSetInto() публичный Метод

Merge this Miner's SET into the given Miner.
public mergeSetInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeUpdateInto() публичный Метод

Merge this Miner's UPDATE into the given Miner.
public mergeUpdateInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

mergeWhereInto() публичный Метод

Merge this Miner's WHERE into the given Miner.
public mergeWhereInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Результат Miner

openHaving() публичный Метод

Add an open bracket for nesting HAVING conditions.
public openHaving ( string $connector = self::LOGICAL_AND ) : Miner
$connector string optional logical connector, default AND
Результат Miner

openWhere() публичный Метод

Add an open bracket for nesting WHERE conditions.
public openWhere ( string $connector = self::LOGICAL_AND ) : Miner
$connector string optional logical connector, default AND
Результат Miner

option() публичный Метод

Add an execution option like DISTINCT or SQL_CALC_FOUND_ROWS.
public option ( string $option ) : Miner
$option string execution option to add
Результат Miner

orHaving() публичный Метод

Add an OR HAVING condition.
public orHaving ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner
$column string colum name
$value mixed value
$operator string optional comparison operator, default =
$quote boolean | null optional auto-escape value, default to global
Результат Miner

orWhere() публичный Метод

Add an OR WHERE condition.
public orWhere ( string $column, mixed $value, string $operator = self::EQUALS, boolean | null $quote = null ) : Miner
$column string colum name
$value mixed value
$operator string optional comparison operator, default =
$quote boolean | null optional auto-escape value, default to global
Результат Miner

orderBy() публичный Метод

Add a column to ORDER BY.
public orderBy ( string $column, string $order = self::ORDER_BY_ASC ) : Miner
$column string column name
$order string optional order direction, default ASC
Результат Miner

quote() публичный Метод

Safely escape a value for use in a statement.
public quote ( mixed $value ) : mixed | false
$value mixed value to escape
Результат mixed | false escaped value or false if failed

replace() публичный Метод

Set the REPLACE table.
public replace ( string $table ) : Miner
$table string REPLACE table
Результат Miner

rightJoin() публичный Метод

Add a RIGHT JOIN table with optional ON criteria.
public rightJoin ( string $table, string | array $criteria = null, string $alias = null ) : Miner
$table string table name
$criteria string | array optional ON criteria
$alias string optional alias
Результат Miner

select() публичный Метод

Add a SELECT column, table, or expression with optional alias.
public select ( string $column, string $alias = null ) : Miner
$column string column name, table name, or expression
$alias string optional alias
Результат Miner

set() публичный Метод

Add one or more column values to INSERT, UPDATE, or REPLACE.
public set ( string | array $column, mixed | null $value = null, boolean | null $quote = null ) : Miner
$column string | array column name or array of columns => values
$value mixed | null optional value for single column
$quote boolean | null optional auto-escape value, default to global
Результат Miner

setAutoQuote() публичный Метод

Set whether to automatically escape values.
public setAutoQuote ( boolean | null $autoQuote ) : Miner
$autoQuote boolean | null whether to automatically escape values
Результат Miner

setPdoConnection() публичный Метод

Set the PDO database connection to use in executing this statement.
public setPdoConnection ( PDO $PdoConnection = null ) : Miner
$PdoConnection PDO optional PDO database connection
Результат Miner

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

Set the UPDATE table.
public update ( string $table ) : Miner
$table string UPDATE table
Результат Miner

values() публичный Метод

Add an array of columns => values to INSERT, UPDATE, or REPLACE.
public values ( array $values ) : Miner
$values array columns => values
Результат Miner

where() публичный Метод

Add a WHERE condition.
public where ( string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$value mixed value
$operator string optional comparison operator, default =
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

whereBetween() публичный Метод

Add a BETWEEN WHERE condition.
public whereBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$min mixed minimum value
$max mixed maximum value
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

whereIn() публичный Метод

Add an IN WHERE condition.
public whereIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$values array values
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

whereNotBetween() публичный Метод

Add a NOT BETWEEN WHERE condition.
public whereNotBetween ( string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$min mixed minimum value
$max mixed maximum value
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner

whereNotIn() публичный Метод

Add a NOT IN WHERE condition.
public whereNotIn ( string $column, array $values, string $connector = self::LOGICAL_AND, boolean | null $quote = null ) : Miner
$column string column name
$values array values
$connector string optional logical connector, default AND
$quote boolean | null optional auto-escape value, default to global
Результат Miner