61 lines
1.3 KiB
PHP
61 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of Aura for PHP.
|
|
*
|
|
* @license http://opensource.org/licenses/bsd-license.php BSD
|
|
*
|
|
*/
|
|
namespace Aura\SqlQuery\Common;
|
|
|
|
/**
|
|
*
|
|
* An interface for setting column values.
|
|
*
|
|
* @package Aura.SqlQuery
|
|
*
|
|
*/
|
|
interface ValuesInterface
|
|
{
|
|
/**
|
|
*
|
|
* Sets one column value placeholder; if an optional second parameter is
|
|
* passed, that value is bound to the placeholder.
|
|
*
|
|
* @param string $col The column name.
|
|
*
|
|
* @return $this
|
|
*
|
|
*/
|
|
public function col($col);
|
|
|
|
/**
|
|
*
|
|
* Sets multiple column value placeholders. If an element is a key-value
|
|
* pair, the key is treated as the column name and the value is bound to
|
|
* that column.
|
|
*
|
|
* @param array $cols A list of column names, optionally as key-value
|
|
* pairs where the key is a column name and the value is a bind value for
|
|
* that column.
|
|
*
|
|
* @return $this
|
|
*
|
|
*/
|
|
public function cols(array $cols);
|
|
|
|
/**
|
|
*
|
|
* Sets a column value directly; the value will not be escaped, although
|
|
* fully-qualified identifiers in the value will be quoted.
|
|
*
|
|
* @param string $col The column name.
|
|
*
|
|
* @param string $value The column value expression.
|
|
*
|
|
* @return $this
|
|
*
|
|
*/
|
|
public function set($col, $value);
|
|
}
|