public function set_update_batch($key, $index = '', $escape = NULL)
{
$key = $this->_object_to_array_batch($key);
if (!is_array($key)) {
// @todo error
}
is_bool($escape) or $escape = $this->_protect_identifiers;
foreach ($key as $k => $v) {
$index_set = FALSE;
$clean = array();
foreach ($v as $k2 => $v2) {
if ($k2 === $index) {
$index_set = TRUE;
}
$clean[$this->protect_identifiers($k2, FALSE, $escape)] = $escape === FALSE ? $v2 : $this->escape($v2);
}
if ($index_set === FALSE) {
return $this->display_error('db_batch_missing_index');
}
$this->qb_set[] = $clean;
}
return $this;
}