public static function buildAttributesPartForUpdate($updateAttributes) { return Joiner::on(', ')->join(FluentArray::from($updateAttributes)->keys()->map(function ($column) { return "{$column} = ?"; })->toArray()); }
public function update() { $attributes = DialectUtil::buildAttributesPartForUpdate($this->_query->updateAttributes); $table = $this->table(); return "UPDATE {$table} SET {$attributes}"; }