Class

eZ\Publish\Core\Persistence\Doctrine\DeleteDoctrineQuery

class DeleteDoctrineQuery extends AbstractDoctrineQuery implements DeleteQuery

Class DeleteDoctrineQuery.

Properties

Expression $expr

Methods

__construct(Connection $connection)

from AbstractDoctrineQuery
SelectQuery subSelect()

Create a subselect used with the current query.

from AbstractDoctrineQuery
Statement prepare()

from AbstractDoctrineQuery
string bindValue($value, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the value $value to the specified variable name $placeHolder.

from AbstractDoctrineQuery
string bindParam($param, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the parameter $param to the specified variable name $placeHolder..

from AbstractDoctrineQuery
string __toString()

Return the SQL string for this query.

from AbstractDoctrineQuery
DeleteQuery deleteFrom(string $table)

Opens the query and sets the target table to $table.

DeleteQuery where()

Adds a where clause with logical expressions to the query.

string getQuery()

Details

in AbstractDoctrineQuery at line 73
public __construct(Connection $connection)

Parameters

Connection $connection

in AbstractDoctrineQuery at line 84
public SelectQuery subSelect()

Create a subselect used with the current query.

Return Value

SelectQuery

in AbstractDoctrineQuery at line 92
public Statement prepare()

Return Value

Statement

in AbstractDoctrineQuery at line 146
public string bindValue($value, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the value $value to the specified variable name $placeHolder.

This method provides a shortcut for PDOStatement::bindValue when using prepared statements.

The parameter $value specifies the value that you want to bind. If $placeholder is not provided bindValue() will automatically create a placeholder for you. An automatic placeholder will be of the name 'placeholder1', 'placeholder2' etc.

For more information see {@link http://php.net/pdostatement-bindparam}

Example: $value = 2; $q->eq( 'id', $q->bindValue( $value ) ); $stmt = $q->prepare(); // the value 2 is bound to the query. $value = 4; $stmt->execute(); // executed with 'id = 2'

Parameters

$value
$placeHolder
$type

Return Value

string the placeholder name used.

in AbstractDoctrineQuery at line 188
public string bindParam($param, $placeHolder = null, $type = PDO::PARAM_STR)

Binds the parameter $param to the specified variable name $placeHolder..

This method provides a shortcut for PDOStatement::bindParam when using prepared statements.

The parameter $param specifies the variable that you want to bind. If $placeholder is not provided bind() will automatically create a placeholder for you. An automatic placeholder will be of the name 'placeholder1', 'placeholder2' etc.

For more information see {@link http://php.net/pdostatement-bindparam}

Example: $value = 2; $q->eq( 'id', $q->bindParam( $value ) ); $stmt = $q->prepare(); // the parameter $value is bound to the query. $value = 4; $stmt->execute(); // executed with 'id = 4'

Parameters

$param
$placeHolder
$type

Return Value

string the placeholder name used.

See also

doBind()

in AbstractDoctrineQuery at line 206
public string __toString()

Return the SQL string for this query.

Return Value

string

at line 41
public DeleteQuery deleteFrom(string $table)

Opens the query and sets the target table to $table.

deleteFrom() returns a pointer to $this.

Parameters

string $table

Return Value

DeleteQuery

at line 70
public DeleteQuery where()

Adds a where clause with logical expressions to the query.

where() accepts an arbitrary number of parameters. Each parameter must contain a logical expression or an array with logical expressions. where() could be invoked several times. All provided arguments added to the end of $whereString and form final WHERE clause of the query. If you specify multiple logical expression they are connected using a logical and.

Example: $q->deleteFrom( 'MyTable' )->where( $q->eq( 'id', 1 ) );

Return Value

DeleteQuery

Exceptions

QueryException if called with no parameters.

at line 84
public string getQuery()

Return Value

string