package Default
inherited_from \Zend\Db\Sql\AbstractPreparableSql

 Methods

__clone

__clone() : void

Resets the where object each time the Update is cloned.

Constructor

__construct(null|string|\Zend\Db\Sql\TableIdentifier $table = null

Parameters

$table

nullstring\Zend\Db\Sql\TableIdentifier

Variable overloading

__get(string $name) : mixed

Proxies to "where" only

Parameters

$name

string

Returns

mixed

getRawState()

getRawState($key = null

Parameters

$key

Get SQL string for statement

getSqlString(\Zend\Db\Adapter\Platform\PlatformInterface $adapterPlatform = null
Inherited
inherited_from \Zend\Db\Sql\SqlInterface::getSqlString()

Parameters

$adapterPlatform

prepareStatement()

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

Parameters

$adapter

$statementContainer

Returns

\Zend\Db\Adapter\StatementContainerInterface

Set key/value pairs to update

set(array $values, string $flag = self::VALUES_SET) : \Zend\Db\Sql\Update

Parameters

$values

array

Associative array of key values

$flag

string

One of the VALUES_* constants

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

\Zend\Db\Sql\Update

Specify table for statement

table(string|\Zend\Db\Sql\TableIdentifier $table) : \Zend\Db\Sql\Update

Parameters

$table

string\Zend\Db\Sql\TableIdentifier

Returns

\Zend\Db\Sql\Update

Create where clause

where(\Zend\Db\Sql\Where|\Closure|string|array $predicate, string $combination = \Zend\Db\Sql\Predicate\PredicateSet::OP_AND) : \Zend\Db\Sql\Update

Parameters

$predicate

\Zend\Db\Sql\Where\Closurestringarray

$combination

string

One of the OP_* constants from Predicate\PredicateSet

Exceptions

\Zend\Db\Sql\Exception\InvalidArgumentException

Returns

\Zend\Db\Sql\Update

buildSqlString()

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

Parameters

$platform

\Zend\Db\Adapter\Platform\PlatformInterface

$driver

null\Zend\Db\Adapter\Driver\DriverInterface

$parameterContainer

null\Zend\Db\Adapter\ParameterContainer

Returns

string

createSqlFromSpecificationAndParameters()

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

Parameters

$specifications

stringarray

$parameters

stringarray

Exceptions

\Zend\Db\Sql\Exception\RuntimeException

Returns

string

Copy variables from the subject into the local properties

localizeVariables() 
Inherited

processExpression()

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

Parameters

$expression

\Zend\Db\Sql\ExpressionInterface

$platform

\Zend\Db\Adapter\Platform\PlatformInterface

$driver

null\Zend\Db\Adapter\Driver\DriverInterface

$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, null|\Zend\Db\Adapter\Driver\DriverInterface $driver = null, null|\Zend\Db\Adapter\ParameterContainer $parameterContainer = null) : string
Inherited

Parameters

$subselect

\Zend\Db\Sql\Select

$platform

\Zend\Db\Adapter\Platform\PlatformInterface

$driver

null\Zend\Db\Adapter\Driver\DriverInterface

$parameterContainer

null\Zend\Db\Adapter\ParameterContainer

Returns

string

processUpdate()

processUpdate(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver = null, \Zend\Db\Adapter\ParameterContainer $parameterContainer = null

Parameters

$platform

$driver

$parameterContainer

processWhere()

processWhere(\Zend\Db\Adapter\Platform\PlatformInterface $platform, \Zend\Db\Adapter\Driver\DriverInterface $driver = null, \Zend\Db\Adapter\ParameterContainer $parameterContainer = null

Parameters

$platform

$driver

$parameterContainer

resolveColumnValue()

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

Parameters

$column

nullarray\Zend\Db\Sql\ExpressionInterface\Zend\Db\Sql\Select

$platform

\Zend\Db\Adapter\Platform\PlatformInterface

$driver

null\Zend\Db\Adapter\Driver\DriverInterface

$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 = null, \Zend\Db\Adapter\ParameterContainer $parameterContainer = null) : string
Inherited

Parameters

$table

string\Zend\Db\Sql\TableIdentifier\Zend\Db\Sql\Select

$platform

\Zend\Db\Adapter\Platform\PlatformInterface

$driver

\Zend\Db\Adapter\Driver\DriverInterface

$parameterContainer

\Zend\Db\Adapter\ParameterContainer

Returns

string

 Properties

 

$where

$where : \Zend\Db\Sql\Where

Default

magic
property
 

$emptyWhereProtection

$emptyWhereProtection : boolean

Default

true
 

$instanceParameterIndex

$instanceParameterIndex : array

Default

array()
 

$processInfo

$processInfo : string

Default

array('paramPrefix' => '', 'subselectCount' => 0)
 

$set

$set : \Zend\Stdlib\PriorityList

Default

 

$specifications

$specifications 

Default

array(self::SPECIFICATION_UPDATE => 'UPDATE %1$s SET %2$s', self::SPECIFICATION_WHERE => 'WHERE %1$s')
 

Specifications for Sql String generation

$specifications : array<mixed,string> | array<mixed,array>

Default

array()
 

$table

$table : string | \Zend\Db\Sql\TableIdentifier

Default

''
 

$where

$where : string | \Zend\Db\Sql\Where

Default

null

 Constants

 

SPECIFICATION_UPDATE

SPECIFICATION_UPDATE = 'update' 
 

SPECIFICATION_WHERE

SPECIFICATION_WHERE = 'where' 
 

VALUES_MERGE

VALUES_MERGE = 'merge' 
 

VALUES_SET

VALUES_SET = 'set'