PHP Class Miner

Hardware/CPU Module for LoadAvg
Author: Karsten Becker
Inheritance: extends Logger
Afficher le fichier Open project: jstayton/miner Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

Constructor.
public __construct ( PDO $PdoConnection = null, boolean $autoQuote = true ) : Miner
$PdoConnection PDO optional PDO database connection
$autoQuote boolean optional auto-escape values, default true
Résultat Miner

__toString() public méthode

Get the full SQL statement without value placeholders.
public __toString ( ) : string
Résultat string full SQL statement

andHaving() public méthode

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
Résultat Miner

andWhere() public méthode

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
Résultat Miner

autoQuote() public méthode

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
Résultat mixed | false value (escaped or original) or false if failed

calcFoundRows() public méthode

Add SQL_CALC_FOUND_ROWS execution option.
public calcFoundRows ( ) : Miner
Résultat Miner

closeHaving() public méthode

Add a closing bracket for nesting HAVING conditions.
public closeHaving ( ) : Miner
Résultat Miner

closeWhere() public méthode

Add a closing bracket for nesting WHERE conditions.
public closeWhere ( ) : Miner
Résultat Miner

delete() public méthode

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
Résultat Miner

distinct() public méthode

Add DISTINCT execution option.
public distinct ( ) : Miner
Résultat Miner

execute() public méthode

Execute the statement using the PDO database connection.
public execute ( ) : PDOStatement | false
Résultat PDOStatement | false executed statement or false if failed

from() public méthode

Set the FROM table with optional alias.
public from ( string $table, string $alias = null ) : Miner
$table string table name
$alias string optional alias
Résultat Miner

getAutoQuote() public méthode

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
Résultat boolean

getDeleteString() public méthode

Get the DELETE portion of the statement as a string.
public getDeleteString ( boolean $includeText = true ) : string
$includeText boolean optional include 'DELETE' text, default true
Résultat string DELETE portion of the statement

getFrom() public méthode

Get the FROM table.
public getFrom ( ) : string
Résultat string FROM table

getFromAlias() public méthode

Get the FROM table alias.
public getFromAlias ( ) : string
Résultat string FROM table alias

getFromString() public méthode

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
Résultat string FROM portion of the statement

getGroupByString() public méthode

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
Résultat string GROUP BY portion of the statement

getHavingPlaceholderValues() public méthode

Get the HAVING placeholder values.
public getHavingPlaceholderValues ( ) : array
Résultat array HAVING placeholder values

getHavingString() public méthode

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
Résultat string HAVING portion of the statement

getInsert() public méthode

Get the INSERT table.
public getInsert ( ) : string
Résultat string INSERT table

getInsertString() public méthode

Get the INSERT portion of the statement as a string.
public getInsertString ( boolean $includeText = true ) : string
$includeText boolean optional include 'INSERT' text, default true
Résultat string INSERT portion of the statement

getJoinString() public méthode

Get the JOIN portion of the statement as a string.
public getJoinString ( ) : string
Résultat string JOIN portion of the statement

getLimit() public méthode

Get the LIMIT on number of rows to return.
public getLimit ( ) : integer | string
Résultat integer | string LIMIT on number of rows to return

getLimitOffset() public méthode

Get the LIMIT row number to start at.
public getLimitOffset ( ) : integer | string
Résultat integer | string LIMIT row number to start at

getLimitString() public méthode

Get the LIMIT portion of the statement as a string.
public getLimitString ( boolean $includeText = true ) : string
$includeText boolean optional include 'LIMIT' text, default true
Résultat string LIMIT portion of the statement

getOptionsString() public méthode

Get the execution options portion of the statement as a string.
public getOptionsString ( boolean $includeTrailingSpace = false ) : string
$includeTrailingSpace boolean optional include space after options
Résultat string execution options portion of the statement

getOrderByString() public méthode

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
Résultat string ORDER BY portion of the statement

getPdoConnection() public méthode

Get the PDO database connection to use in executing this statement.
public getPdoConnection ( ) : PDO | null
Résultat PDO | null

getPlaceholderValues() public méthode

Get all placeholder values (SET, WHERE, and HAVING).
public getPlaceholderValues ( ) : array
Résultat array all placeholder values

getReplace() public méthode

Get the REPLACE table.
public getReplace ( ) : string
Résultat string REPLACE table

getReplaceString() public méthode

Get the REPLACE portion of the statement as a string.
public getReplaceString ( boolean $includeText = true ) : string
$includeText boolean optional include 'REPLACE' text, default true
Résultat string REPLACE portion of the statement

getSelectString() public méthode

Get the SELECT portion of the statement as a string.
public getSelectString ( boolean $includeText = true ) : string
$includeText boolean optional include 'SELECT' text, default true
Résultat string SELECT portion of the statement

getSetPlaceholderValues() public méthode

Get the SET placeholder values.
public getSetPlaceholderValues ( ) : array
Résultat array SET placeholder values

getSetString() public méthode

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
Résultat string SET portion of the statement

getStatement() public méthode

Get the full SQL statement.
public getStatement ( boolean $usePlaceholders = true ) : string
$usePlaceholders boolean optional use ? placeholders, default true
Résultat string full SQL statement

getUpdate() public méthode

Get the UPDATE table.
public getUpdate ( ) : string
Résultat string UPDATE table

getUpdateString() public méthode

Get the UPDATE portion of the statement as a string.
public getUpdateString ( boolean $includeText = true ) : string
$includeText boolean optional include 'UPDATE' text, default true
Résultat string UPDATE portion of the statement

getWherePlaceholderValues() public méthode

Get the WHERE placeholder values.
public getWherePlaceholderValues ( ) : array
Résultat array WHERE placeholder values

getWhereString() public méthode

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
Résultat string WHERE portion of the statement

groupBy() public méthode

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
Résultat Miner

having() public méthode

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
Résultat Miner

havingBetween() public méthode

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
Résultat Miner

havingIn() public méthode

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
Résultat Miner

havingNotBetween() public méthode

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
Résultat Miner

havingNotIn() public méthode

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
Résultat Miner

innerJoin() public méthode

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
Résultat Miner

insert() public méthode

Set the INSERT table.
public insert ( string $table ) : Miner
$table string INSERT table
Résultat Miner

isDelete() public méthode

Whether this is a DELETE statement.
public isDelete ( ) : boolean
Résultat boolean whether this is a DELETE statement

isInsert() public méthode

Whether this is an INSERT statement.
public isInsert ( ) : boolean
Résultat boolean whether this is an INSERT statement

isReplace() public méthode

Whether this is a REPLACE statement.
public isReplace ( ) : boolean
Résultat boolean whether this is a REPLACE statement

isSelect() public méthode

Whether this is a SELECT statement.
public isSelect ( ) : boolean
Résultat boolean whether this is a SELECT statement

isUpdate() public méthode

Whether this is an UPDATE statement.
public isUpdate ( ) : boolean
Résultat boolean whether this is an UPDATE statement

join() public méthode

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
Résultat Miner

leftJoin() public méthode

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
Résultat Miner

limit() public méthode

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
Résultat Miner

mergeDeleteInto() public méthode

Merge this Miner's DELETE into the given Miner.
public mergeDeleteInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeFromInto() public méthode

Merge this Miner's FROM into the given Miner.
public mergeFromInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeGroupByInto() public méthode

Merge this Miner's GROUP BY into the given Miner.
public mergeGroupByInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeHavingInto() public méthode

Merge this Miner's HAVING into the given Miner.
public mergeHavingInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeInsertInto() public méthode

Merge this Miner's INSERT into the given Miner.
public mergeInsertInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeInto() public méthode

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
Résultat Miner

mergeJoinInto() public méthode

Merge this Miner's JOINs into the given Miner.
public mergeJoinInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeLimitInto() public méthode

Merge this Miner's LIMIT into the given Miner.
public mergeLimitInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeOptionsInto() public méthode

Merge this Miner's execution options into the given Miner.
public mergeOptionsInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeOrderByInto() public méthode

Merge this Miner's ORDER BY into the given Miner.
public mergeOrderByInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeReplaceInto() public méthode

Merge this Miner's REPLACE into the given Miner.
public mergeReplaceInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeSelectInto() public méthode

Merge this Miner's SELECT into the given Miner.
public mergeSelectInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeSetInto() public méthode

Merge this Miner's SET into the given Miner.
public mergeSetInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeUpdateInto() public méthode

Merge this Miner's UPDATE into the given Miner.
public mergeUpdateInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

mergeWhereInto() public méthode

Merge this Miner's WHERE into the given Miner.
public mergeWhereInto ( Miner $Miner ) : Miner
$Miner Miner to merge into
Résultat Miner

openHaving() public méthode

Add an open bracket for nesting HAVING conditions.
public openHaving ( string $connector = self::LOGICAL_AND ) : Miner
$connector string optional logical connector, default AND
Résultat Miner

openWhere() public méthode

Add an open bracket for nesting WHERE conditions.
public openWhere ( string $connector = self::LOGICAL_AND ) : Miner
$connector string optional logical connector, default AND
Résultat Miner

option() public méthode

Add an execution option like DISTINCT or SQL_CALC_FOUND_ROWS.
public option ( string $option ) : Miner
$option string execution option to add
Résultat Miner

orHaving() public méthode

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
Résultat Miner

orWhere() public méthode

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
Résultat Miner

orderBy() public méthode

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
Résultat Miner

quote() public méthode

Safely escape a value for use in a statement.
public quote ( mixed $value ) : mixed | false
$value mixed value to escape
Résultat mixed | false escaped value or false if failed

replace() public méthode

Set the REPLACE table.
public replace ( string $table ) : Miner
$table string REPLACE table
Résultat Miner

rightJoin() public méthode

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
Résultat Miner

select() public méthode

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
Résultat Miner

set() public méthode

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
Résultat Miner

setAutoQuote() public méthode

Set whether to automatically escape values.
public setAutoQuote ( boolean | null $autoQuote ) : Miner
$autoQuote boolean | null whether to automatically escape values
Résultat Miner

setPdoConnection() public méthode

Set the PDO database connection to use in executing this statement.
public setPdoConnection ( PDO $PdoConnection = null ) : Miner
$PdoConnection PDO optional PDO database connection
Résultat Miner

update() public méthode

Set the UPDATE table.
public update ( string $table ) : Miner
$table string UPDATE table
Résultat Miner

values() public méthode

Add an array of columns => values to INSERT, UPDATE, or REPLACE.
public values ( array $values ) : Miner
$values array columns => values
Résultat Miner

where() public méthode

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
Résultat Miner

whereBetween() public méthode

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
Résultat Miner

whereIn() public méthode

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
Résultat Miner

whereNotBetween() public méthode

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
Résultat Miner

whereNotIn() public méthode

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
Résultat Miner