A few tweaks

This commit is contained in:
Timothy Warren 2022-09-29 10:30:37 -04:00
parent 3013242106
commit 03f8fe30d0
3 changed files with 10 additions and 11 deletions

View File

@ -3,12 +3,12 @@
*
* SQL Query Builder / Database Abstraction Layer
*
* PHP version 7.4
* PHP version 8.1
*
* @package Query
* @author Timothy J. Warren <tim@timshomepage.net>
* @copyright 2012 - 2020 Timothy J. Warren
* @copyright 2012 - 2022 Timothy J. Warren
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link https://git.timshomepage.net/aviat/Query
* @version 3.0.0
* @version 4.0.0
*/

View File

@ -105,11 +105,11 @@ class Util extends AbstractUtil {
$row = array_values($row);
// Workaround for Quercus
foreach($row as &$r)
{
$r = $driver->quote($r);
}
unset($r);
// foreach($row as &$r)
// {
// $r = $driver->quote($r);
// }
// unset($r);
$row = array_map('trim', $row);
$rowString = 'INSERT INTO `'.trim($t).'` (`'.implode('`,`', $columns).'`) VALUES ('.implode(',', $row).');';

View File

@ -94,7 +94,7 @@ class QueryBuilderBase {
/**
* Constructor
*/
public function __construct(protected ?\Query\Drivers\DriverInterface $driver, protected QueryParser $parser)
public function __construct(protected ?DriverInterface $driver, protected QueryParser $parser)
{
// Create new State object
$this->state = new State();
@ -526,13 +526,12 @@ class QueryBuilderBase {
}
// Generate the appropriate select query for the returning clause fallback
// @TODO figure out how to do a proper fallback
switch ($type)
{
case QueryType::INSERT:
case QueryType::UPDATE:
// @TODO figure out a good response for update query
break;
case QueryType::INSERT_BATCH:
case QueryType::UPDATE_BATCH: