Documentation

ConcatDataBinder
in package
implements PdbDataBinderInterface

Wrap an item with a 'concat' modifier.

Such as:

$data = [ 'item' => new ConcatDataBinder($item) ];
$pdb->update('table', $data, ['id' => $id]);

Produces a query:

UPDATE ~table SET item = CONCAT(item, ?) WHERE id = ?

Table of Contents

Interfaces

PdbDataBinderInterface
This defines how values are formatted and bound to queries.

Properties

$value  : string

Methods

__construct()  : mixed
getBindingQuery()  : string
Get the SQL snippet for an `UPDATE SET` query.
getBindingValue()  : string|int|float|object
Get the value to bind to a query.

Properties

Methods

__construct()

public __construct(string $value) : mixed
Parameters
$value : string

getBindingQuery()

Get the SQL snippet for an `UPDATE SET` query.

public getBindingQuery(Pdb $pdb, string $column) : string
Parameters
$pdb : Pdb
$column : string
Tags
inheritdoc
Return values
string

getBindingValue()

Get the value to bind to a query.

public getBindingValue() : string|int|float|object
Tags
inheritdoc
Return values
string|int|float|object
On this page

Search results