Your ROOT_URL in app.ini is https://code.exacti.com.br/ but you are visiting https://git.exacti.com.br/ExacTI/phacil-framework/blame/commit/6dd28e0f05b7b16e1e669b9af459193c3bce3e96/system/MagiQL/Builder/Syntax/Adapt/SQLite3/UpdateWriter.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework

37 lines
944 B

<?php
/**
* Copyright © 2024 ExacTI Technology Solutions. All rights reserved.
* GPLv3 General License.
* https://exacti.com.br
* Phacil PHP Framework - https://github.com/exacti/phacil-framework
*/
namespace Phacil\Framework\MagiQL\Builder\Syntax\Adapt\SQLite3;
use Phacil\Framework\MagiQL\Builder\Syntax\UpdateWriter as GenericWriter;
use Phacil\Framework\MagiQL\Manipulation\Update;
use Phacil\Framework\MagiQL\Syntax\SyntaxFactory;
class UpdateWriter extends GenericWriter
{
/**
* @param Update $update
*
* @return string
*/
protected function writeUpdateValues(Update $update)
{
$assigns = [];
foreach ($update->getValues() as $column => $value) {
$newColumn = array($column);
$column = $this->columnWriter->writeColumn(SyntaxFactory::createColumn($newColumn, null));
$value = $this->writer->writePlaceholderValue($value);
$assigns[] = "$column = $value";
}
return \implode(', ', $assigns);
}
}