From 03f8fe30d049c812bb5dca4a1d2f5bc0f0e13611 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 29 Sep 2022 10:30:37 -0400 Subject: [PATCH] A few tweaks --- build/header_comment.txt | 6 +++--- src/Drivers/Mysql/Util.php | 10 +++++----- src/QueryBuilderBase.php | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build/header_comment.txt b/build/header_comment.txt index f803c2d..0108f95 100644 --- a/build/header_comment.txt +++ b/build/header_comment.txt @@ -3,12 +3,12 @@ * * SQL Query Builder / Database Abstraction Layer * - * PHP version 7.4 + * PHP version 8.1 * * @package Query * @author Timothy J. Warren - * @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 */ diff --git a/src/Drivers/Mysql/Util.php b/src/Drivers/Mysql/Util.php index fef97af..35918e4 100644 --- a/src/Drivers/Mysql/Util.php +++ b/src/Drivers/Mysql/Util.php @@ -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).');'; diff --git a/src/QueryBuilderBase.php b/src/QueryBuilderBase.php index 585049b..2b1e70a 100644 --- a/src/QueryBuilderBase.php +++ b/src/QueryBuilderBase.php @@ -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: