Combine SQL statement - allows combining multiple select statements into one

 Methods

__construct()

__construct(\Zend\Db\Sql\Select | array | null $select, string $type, string $modifier) 

Parameters

$select

\Zend\Db\Sql\Selectarraynull

$type

string

$modifier

string

alignColumns()

alignColumns() : \Zend\Db\Sql\$this

Returns

\Zend\Db\Sql\$this

Create combine clause

combine(\Zend\Db\Sql\Select | array $select, string $type, string $modifier) : \Zend\Db\Sql\self

Parameters

$select

\Zend\Db\Sql\Selectarray

$type

string

$modifier

string

Returns

\Zend\Db\Sql\self

Create except clause

except(\Zend\Db\Sql\Select | array $select, string $modifier) : \Zend\Db\Sql\self

Parameters

$select

\Zend\Db\Sql\Selectarray

$modifier

string

Returns

\Zend\Db\Sql\self

Get raw state

getRawState(string $key) : array

Parameters

$key

string

Returns

array

Get SQL string for statement

getSqlString(\Zend\Db\Adapter\Platform\PlatformInterface $adapterPlatform) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::getSqlString()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::getSqlString()

Parameters

Returns

string

Create intersect clause

intersect(\Zend\Db\Sql\Select | array $select, string $modifier) : \Zend\Db\Sql\self

Parameters

$select

\Zend\Db\Sql\Selectarray

$modifier

string

Returns

\Zend\Db\Sql\self

prepareStatement()

prepareStatement(\Zend\Db\Adapter\AdapterInterface $adapter, \Zend\Db\Adapter\StatementContainerInterface $statementContainer) : \Zend\Db\Adapter\StatementContainerInterface
Inherited

inherited_from \Zend\Db\Sql\AbstractPreparableSql::prepareStatement()

Parameters

Returns

Create union clause

union(\Zend\Db\Sql\Select | array $select, string $modifier) : \Zend\Db\Sql\self

Parameters

$select

\Zend\Db\Sql\Selectarray

$modifier

string

Returns

\Zend\Db\Sql\self

Build sql string

buildSqlString(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver, \Zend\Db\Adapter\ParameterContainer $parameterContainer) : string

createSqlFromSpecificationAndParameters()

createSqlFromSpecificationAndParameters(string | array $specifications, string | array $parameters) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::createSqlFromSpecificationAndParameters()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::createSqlFromSpecificationAndParameters()

Parameters

$specifications

stringarray

$parameters

stringarray

Exceptions

\Zend\Db\Sql\Exception\RuntimeException

Returns

string

Copy variables from the subject into the local properties

localizeVariables() 
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::localizeVariables()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::localizeVariables()

processExpression()

processExpression(\Zend\Db\Sql\ExpressionInterface $expression, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver, \Zend\Db\Adapter\ParameterContainer $parameterContainer, null | string $namedParameterPrefix) : string
Inherited

staticvar int $runtimeExpressionPrefix
inherited_from \Zend\Db\Sql\AbstractSql::processExpression()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::processExpression()

Parameters

$parameterContainer

null\Zend\Db\Adapter\ParameterContainer

$namedParameterPrefix

nullstring

Exceptions

\Zend\Db\Sql\Exception\RuntimeException

Returns

string

processSubSelect()

processSubSelect(\Zend\Db\Sql\Select $subselect, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver, \Zend\Db\Adapter\ParameterContainer $parameterContainer) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::processSubSelect()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::processSubSelect()

Parameters

$subselect

\Zend\Db\Sql\Select

$parameterContainer

null\Zend\Db\Adapter\ParameterContainer

Returns

string

resolveColumnValue()

resolveColumnValue(null | array | \Zend\Db\Sql\ExpressionInterface | \Zend\Db\Sql\Select $column, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver, \Zend\Db\Adapter\ParameterContainer $parameterContainer, null | string $namedParameterPrefix) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::resolveColumnValue()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::resolveColumnValue()

Parameters

$parameterContainer

null\Zend\Db\Adapter\ParameterContainer

$namedParameterPrefix

nullstring

Returns

string

resolveTable()

resolveTable(string | \Zend\Db\Sql\TableIdentifier | \Zend\Db\Sql\Select $table, \Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver, \Zend\Db\Adapter\ParameterContainer $parameterContainer) : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::resolveTable()
inherited_from \Zend\Db\Sql\AbstractPreparableSql::resolveTable()

Parameters

Returns

string

 Properties

 

$instanceParameterIndex

$instanceParameterIndex : array
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::$$instanceParameterIndex
inherited_from \Zend\Db\Sql\AbstractPreparableSql::$$instanceParameterIndex
 

$processInfo

$processInfo : string
Inherited

inherited_from \Zend\Db\Sql\AbstractSql::$$processInfo
inherited_from \Zend\Db\Sql\AbstractPreparableSql::$$processInfo
 

Specifications for Sql String generation

$specifications : string[]

 

$combine

$combine : \Zend\Db\Sql\Select[][]

 Constants

 

COLUMNS

COLUMNS 

 

COMBINE

COMBINE 

 

COMBINE_EXCEPT

COMBINE_EXCEPT 

 

COMBINE_INTERSECT

COMBINE_INTERSECT 

 

COMBINE_UNION

COMBINE_UNION