A dead simple PHP class for building SQL statements. No manual string concatenation necessary.

author Justin Stayton
copyright Copyright 2014 by Justin Stayton
license MIT
package Miner
version 0.10.0

 Methods

Constructor.

__construct(\PDO|null $PdoConnection = null, bool $autoQuote = true) : \Miner

Parameters

$PdoConnection

\PDOnull

optional PDO database connection

$autoQuote

bool

optional auto-escape values, default true

Returns

\Miner

Get the full SQL statement without value placeholders.

__toString() : string

Returns

stringfull SQL statement

Add an AND HAVING condition.

andHaving(string $column, mixed $value, string $operator = self::EQUALS, bool|null $quote = null) : \Miner

Parameters

$column

string

colum name

$value

mixed

value

$operator

string

optional comparison operator, default =

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an AND WHERE condition.

andWhere(string $column, mixed $value, string $operator = self::EQUALS, bool|null $quote = null) : \Miner

Parameters

$column

string

colum name

$value

mixed

value

$operator

string

optional comparison operator, default =

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Safely escape a value if auto-quoting is enabled, or do nothing if disabled.

autoQuote(mixed $value, bool|null $override = null) : mixed | false
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.

Parameters

$value

mixed

value to escape (or not)

$override

boolnull

value-specific override for convenience

Returns

mixedfalsevalue (escaped or original) or false if failed

Add SQL_CALC_FOUND_ROWS execution option.

calcFoundRows() : \Miner

Returns

\Miner

Add a closing bracket for nesting HAVING conditions.

closeHaving() : \Miner

Returns

\Miner

Add a closing bracket for nesting WHERE conditions.

closeWhere() : \Miner

Returns

\Miner

Add a table to DELETE from, or false if deleting from the FROM table.

delete(string|false $table = false) : \Miner

Parameters

$table

stringfalse

optional table name, default false

Returns

\Miner

Add DISTINCT execution option.

distinct() : \Miner

Returns

\Miner

Execute the statement using the PDO database connection.

execute() : \PDOStatement | false

Returns

\PDOStatementfalseexecuted statement or false if failed

Set the FROM table with optional alias.

from(string $table, string $alias = null) : \Miner

Parameters

$table

string

table name

$alias

string

optional alias

Returns

\Miner

Get whether values will be automatically escaped.

getAutoQuote(bool|null $override = null) : bool
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.

Parameters

$override

boolnull

value-specific override for convenience

Returns

bool

Get the DELETE portion of the statement as a string.

getDeleteString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'DELETE' text, default true

Returns

stringDELETE portion of the statement

Get the FROM table.

getFrom() : string

Returns

stringFROM table

Get the FROM table alias.

getFromAlias() : string

Returns

stringFROM table alias

Get the FROM portion of the statement, including all JOINs, as a string.

getFromString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'FROM' text, default true

Returns

stringFROM portion of the statement

Get the GROUP BY portion of the statement as a string.

getGroupByString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'GROUP BY' text, default true

Returns

stringGROUP BY portion of the statement

Get the HAVING placeholder values.

getHavingPlaceholderValues() : array

Returns

arrayHAVING placeholder values

Get the HAVING portion of the statement as a string.

getHavingString(bool $usePlaceholders = true, bool $includeText = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

$includeText

bool

optional include 'HAVING' text, default true

Returns

stringHAVING portion of the statement

Get the INSERT table.

getInsert() : string

Returns

stringINSERT table

Get the INSERT portion of the statement as a string.

getInsertString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'INSERT' text, default true

Returns

stringINSERT portion of the statement

Get the JOIN portion of the statement as a string.

getJoinString() : string

Returns

stringJOIN portion of the statement

Get the LIMIT on number of rows to return.

getLimit() : int | string

Returns

intstringLIMIT on number of rows to return

Get the LIMIT row number to start at.

getLimitOffset() : int | string

Returns

intstringLIMIT row number to start at

Get the LIMIT portion of the statement as a string.

getLimitString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'LIMIT' text, default true

Returns

stringLIMIT portion of the statement

Get the execution options portion of the statement as a string.

getOptionsString(bool $includeTrailingSpace = false) : string

Parameters

$includeTrailingSpace

bool

optional include space after options

Returns

stringexecution options portion of the statement

Get the ORDER BY portion of the statement as a string.

getOrderByString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'ORDER BY' text, default true

Returns

stringORDER BY portion of the statement

Get the PDO database connection to use in executing this statement.

getPdoConnection() : \PDO | null

Returns

\PDOnull

Get all placeholder values (SET, WHERE, and HAVING).

getPlaceholderValues() : array

Returns

arrayall placeholder values

Get the REPLACE table.

getReplace() : string

Returns

stringREPLACE table

Get the REPLACE portion of the statement as a string.

getReplaceString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'REPLACE' text, default true

Returns

stringREPLACE portion of the statement

Get the SELECT portion of the statement as a string.

getSelectString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'SELECT' text, default true

Returns

stringSELECT portion of the statement

Get the SET placeholder values.

getSetPlaceholderValues() : array

Returns

arraySET placeholder values

Get the SET portion of the statement as a string.

getSetString(bool $usePlaceholders = true, bool $includeText = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

$includeText

bool

optional include 'SET' text, default true

Returns

stringSET portion of the statement

Get the full SQL statement.

getStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull SQL statement

Get the UPDATE table.

getUpdate() : string

Returns

stringUPDATE table

Get the UPDATE portion of the statement as a string.

getUpdateString(bool $includeText = true) : string

Parameters

$includeText

bool

optional include 'UPDATE' text, default true

Returns

stringUPDATE portion of the statement

Get the WHERE placeholder values.

getWherePlaceholderValues() : array

Returns

arrayWHERE placeholder values

Get the WHERE portion of the statement as a string.

getWhereString(bool $usePlaceholders = true, bool $includeText = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

$includeText

bool

optional include 'WHERE' text, default true

Returns

stringWHERE portion of the statement

Add a GROUP BY column.

groupBy(string $column, string|null $order = null) : \Miner

Parameters

$column

string

column name

$order

stringnull

optional order direction, default none

Returns

\Miner

Add a HAVING condition.

having(string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

colum name

$value

mixed

value

$operator

string

optional comparison operator, default =

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a BETWEEN HAVING condition.

havingBetween(string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an IN WHERE condition.

havingIn(string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT BETWEEN HAVING condition.

havingNotBetween(string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT IN HAVING condition.

havingNotIn(string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an INNER JOIN table with optional ON criteria.

innerJoin(string $table, string|array $criteria = null, string $alias = null) : \Miner

Parameters

$table

string

table name

$criteria

stringarray

optional ON criteria

$alias

string

optional alias

Returns

\Miner

Set the INSERT table.

insert(string $table) : \Miner

Parameters

$table

string

INSERT table

Returns

\Miner

Whether this is a DELETE statement.

isDelete() : bool

Returns

boolwhether this is a DELETE statement

Whether this is an INSERT statement.

isInsert() : bool

Returns

boolwhether this is an INSERT statement

Whether this is a REPLACE statement.

isReplace() : bool

Returns

boolwhether this is a REPLACE statement

Whether this is a SELECT statement.

isSelect() : bool

Returns

boolwhether this is a SELECT statement

Whether this is an UPDATE statement.

isUpdate() : bool

Returns

boolwhether this is an UPDATE statement

Add a JOIN table with optional ON criteria.

join(string $table, string|array $criteria = null, string $type = self::INNER_JOIN, string $alias = null) : \Miner

Parameters

$table

string

table name

$criteria

stringarray

optional ON criteria

$type

string

optional type of join, default INNER JOIN

$alias

string

optional alias

Returns

\Miner

Add a LEFT JOIN table with optional ON criteria.

leftJoin(string $table, string|array $criteria = null, string $alias = null) : \Miner

Parameters

$table

string

table name

$criteria

stringarray

optional ON criteria

$alias

string

optional alias

Returns

\Miner

Set the LIMIT on number of rows to return with optional offset.

limit(int|string $limit, int|string $offset = 0) : \Miner

Parameters

$limit

intstring

number of rows to return

$offset

intstring

optional row number to start at, default 0

Returns

\Miner

Merge this Miner's DELETE into the given Miner.

mergeDeleteInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's FROM into the given Miner.

mergeFromInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's GROUP BY into the given Miner.

mergeGroupByInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's HAVING into the given Miner.

mergeHavingInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's INSERT into the given Miner.

mergeInsertInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner into the given Miner.

mergeInto(\Miner $Miner, bool $overrideLimit = true) : \Miner

Parameters

$Miner

\Miner

to merge into

$overrideLimit

bool

optional override limit, default true

Returns

\Miner

Merge this Miner's JOINs into the given Miner.

mergeJoinInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's LIMIT into the given Miner.

mergeLimitInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's execution options into the given Miner.

mergeOptionsInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's ORDER BY into the given Miner.

mergeOrderByInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's REPLACE into the given Miner.

mergeReplaceInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's SELECT into the given Miner.

mergeSelectInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's SET into the given Miner.

mergeSetInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's UPDATE into the given Miner.

mergeUpdateInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Merge this Miner's WHERE into the given Miner.

mergeWhereInto(\Miner $Miner) : \Miner

Parameters

$Miner

\Miner

to merge into

Returns

\Miner

Add an open bracket for nesting HAVING conditions.

openHaving(string $connector = self::LOGICAL_AND) : \Miner

Parameters

$connector

string

optional logical connector, default AND

Returns

\Miner

Add an open bracket for nesting WHERE conditions.

openWhere(string $connector = self::LOGICAL_AND) : \Miner

Parameters

$connector

string

optional logical connector, default AND

Returns

\Miner

Add an execution option like DISTINCT or SQL_CALC_FOUND_ROWS.

option(string $option) : \Miner

Parameters

$option

string

execution option to add

Returns

\Miner

Add an OR HAVING condition.

orHaving(string $column, mixed $value, string $operator = self::EQUALS, bool|null $quote = null) : \Miner

Parameters

$column

string

colum name

$value

mixed

value

$operator

string

optional comparison operator, default =

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an OR WHERE condition.

orWhere(string $column, mixed $value, string $operator = self::EQUALS, bool|null $quote = null) : \Miner

Parameters

$column

string

colum name

$value

mixed

value

$operator

string

optional comparison operator, default =

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a column to ORDER BY.

orderBy(string $column, string $order = self::ORDER_BY_ASC) : \Miner

Parameters

$column

string

column name

$order

string

optional order direction, default ASC

Returns

\Miner

Safely escape a value for use in a statement.

quote(mixed $value) : mixed | false

Parameters

$value

mixed

value to escape

Returns

mixedfalseescaped value or false if failed

Set the REPLACE table.

replace(string $table) : \Miner

Parameters

$table

string

REPLACE table

Returns

\Miner

Add a RIGHT JOIN table with optional ON criteria.

rightJoin(string $table, string|array $criteria = null, string $alias = null) : \Miner

Parameters

$table

string

table name

$criteria

stringarray

optional ON criteria

$alias

string

optional alias

Returns

\Miner

Add a SELECT column, table, or expression with optional alias.

select(string $column, string $alias = null) : \Miner

Parameters

$column

string

column name, table name, or expression

$alias

string

optional alias

Returns

\Miner

Add one or more column values to INSERT, UPDATE, or REPLACE.

set(string|array $column, mixed|null $value = null, bool|null $quote = null) : \Miner

Parameters

$column

stringarray

column name or array of columns => values

$value

mixednull

optional value for single column

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Set whether to automatically escape values.

setAutoQuote(bool|null $autoQuote) : \Miner

Parameters

$autoQuote

boolnull

whether to automatically escape values

Returns

\Miner

Set the PDO database connection to use in executing this statement.

setPdoConnection(\PDO|null $PdoConnection = null) : \Miner

Parameters

$PdoConnection

\PDOnull

optional PDO database connection

Returns

\Miner

Set the UPDATE table.

update(string $table) : \Miner

Parameters

$table

string

UPDATE table

Returns

\Miner

Add an array of columns => values to INSERT, UPDATE, or REPLACE.

values(array $values) : \Miner

Parameters

$values

array

columns => values

Returns

\Miner

Add a WHERE condition.

where(string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$value

mixed

value

$operator

string

optional comparison operator, default =

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a BETWEEN WHERE condition.

whereBetween(string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an IN WHERE condition.

whereIn(string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT BETWEEN WHERE condition.

whereNotBetween(string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT IN WHERE condition.

whereNotIn(string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a closing bracket for nesting conditions to the specified WHERE or HAVING criteria.

closeCriteria(array $criteria) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

Returns

\Miner

Add a condition to the specified WHERE or HAVING criteria.

criteria(array $criteria, string $column, mixed $value, string $operator = self::EQUALS, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$value

mixed

value

$operator

string

optional comparison operator, default =

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a BETWEEN condition to the specified WHERE or HAVING criteria.

criteriaBetween(array $criteria, string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add an IN condition to the specified WHERE or HAVING criteria.

criteriaIn(array $criteria, string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT BETWEEN condition to the specified WHERE or HAVING criteria.

criteriaNotBetween(array $criteria, string $column, mixed $min, mixed $max, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$min

mixed

minimum value

$max

mixed

maximum value

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Add a NOT IN condition to the specified WHERE or HAVING criteria.

criteriaNotIn(array $criteria, string $column, array $values, string $connector = self::LOGICAL_AND, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$values

array

values

$connector

string

optional logical connector, default AND

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

Get the WHERE or HAVING portion of the statement as a string.

getCriteriaString(array $criteria, bool $usePlaceholders = true, array $placeholderValues = array()) : string

Parameters

$criteria

array

WHERE or HAVING criteria

$usePlaceholders

bool

optional use ? placeholders, default true

$placeholderValues

array

optional placeholder values array

Returns

stringWHERE or HAVING portion of the statement

Get the full DELETE statement.

getDeleteStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull DELETE statement

Get the full INSERT statement.

getInsertStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull INSERT statement

Get an ON criteria string joining the specified table and column to the same column of the previous JOIN or FROM table.

getJoinCriteriaUsingPreviousTable(int $joinIndex, string $table, string $column) : string

Parameters

$joinIndex

int

index of current join

$table

string

current table name

$column

string

current column name

Returns

stringON join criteria

Get the full REPLACE statement.

getReplaceStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull REPLACE statement

Get the full SELECT statement.

getSelectStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull SELECT statement

Get the full UPDATE statement.

getUpdateStatement(bool $usePlaceholders = true) : string

Parameters

$usePlaceholders

bool

optional use ? placeholders, default true

Returns

stringfull UPDATE statement

Whether the FROM table is the single table to delete from.

isDeleteTableFrom() : bool

Returns

boolwhether the delete table is FROM

Whether the join table and alias is unique (hasn't already been joined).

isJoinUnique(string $table, string $alias) : bool

Parameters

$table

string

table name

$alias

string

table alias

Returns

boolwhether the join table and alias is unique

Add an open bracket for nesting conditions to the specified WHERE or HAVING criteria.

openCriteria(array $criteria, string $connector = self::LOGICAL_AND) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$connector

string

optional logical connector, default AND

Returns

\Miner

Add an OR condition to the specified WHERE or HAVING criteria.

orCriteria(array $criteria, string $column, mixed $value, string $operator = self::EQUALS, bool|null $quote = null) : \Miner

Parameters

$criteria

array

WHERE or HAVING criteria

$column

string

column name

$value

mixed

value

$operator

string

optional comparison operator, default =

$quote

boolnull

optional auto-escape value, default to global

Returns

\Miner

 Properties

 

PDO database connection to use in executing the statement.

$PdoConnection : \PDO | null

Default

 

Whether to automatically escape values.

$autoQuote : bool | null

Default

 

Tables to DELETE from, or true if deleting from the FROM table.

$delete : array | true

Default

 

Table to select FROM.

$from : array

Default

 

Columns to GROUP BY.

$groupBy : array

Default

 

HAVING criteria.

$having : array

Default

 

HAVING placeholder values.

$havingPlaceholderValues : array

Default

 

Table to INSERT into.

$insert : string

Default

 

JOIN tables and ON criteria.

$join : array

Default

 

Number of rows to return from offset.

$limit : array

Default

 

Execution options like DISTINCT and SQL_CALC_FOUND_ROWS.

$option : array

Default

 

Columns to ORDER BY.

$orderBy : array

Default

 

Table to REPLACE into.

$replace : string

Default

 

Columns, tables, and expressions to SELECT from.

$select : array

Default

 

Column values to INSERT, UPDATE, or REPLACE.

$set : array

Default

 

SET placeholder values.

$setPlaceholderValues : array

Default

 

Table to UPDATE.

$update : string

Default

 

WHERE criteria.

$where : array

Default

 

WHERE placeholder values.

$wherePlaceholderValues : array

Default

 Constants

 

BETWEEN comparison operator.

BETWEEN = "BETWEEN" 
 

Closing bracket for grouping criteria.

BRACKET_CLOSE = ")" 
 

Open bracket for grouping criteria.

BRACKET_OPEN = "(" 
 

Equals comparison operator.

EQUALS = "=" 
 

Greater than comparison operator.

GREATER_THAN = ">" 
 

Greater than or equal to comparison operator.

GREATER_THAN_OR_EQUAL = ">=" 
 

ILIKE comparison operator.

ILIKE = "ILIKE" 
 

IN comparison operator.

IN = "IN" 
 

INNER JOIN type.

INNER_JOIN = "INNER JOIN" 
 

IS comparison operator.

IS = "IS" 
 

IS NOT comparison operator.

IS_NOT = "IS NOT" 
 

LEFT JOIN type.

LEFT_JOIN = "LEFT JOIN" 
 

Less than comparison operator.

LESS_THAN = "<" 
 

Less than or equal to comparison operator.

LESS_THAN_OR_EQUAL = "<=" 
 

LIKE comparison operator.

LIKE = "LIKE" 
 

AND logical operator.

LOGICAL_AND = "AND" 
 

OR logical operator.

LOGICAL_OR = "OR" 
 

NOT BETWEEN comparison operator.

NOT_BETWEEN = "NOT BETWEEN" 
 

Not equals comparison operator.

NOT_EQUALS = "!=" 
 

NOT IN comparison operator.

NOT_IN = "NOT IN" 
 

NOT LIKE comparison operator.

NOT_LIKE = "NOT LIKE" 
 

NOT REGEXP comparison operator.

NOT_REGEX = "NOT REGEXP" 
 

Ascending ORDER BY direction.

ORDER_BY_ASC = "ASC" 
 

Descending ORDER BY direction.

ORDER_BY_DESC = "DESC" 
 

REGEXP comparison operator.

REGEX = "REGEXP" 
 

RIGHT JOIN type.

RIGHT_JOIN = "RIGHT JOIN"