A few tweaks
This commit is contained in:
parent
3013242106
commit
03f8fe30d0
@ -3,12 +3,12 @@
|
|||||||
*
|
*
|
||||||
* SQL Query Builder / Database Abstraction Layer
|
* SQL Query Builder / Database Abstraction Layer
|
||||||
*
|
*
|
||||||
* PHP version 7.4
|
* PHP version 8.1
|
||||||
*
|
*
|
||||||
* @package Query
|
* @package Query
|
||||||
* @author Timothy J. Warren <tim@timshomepage.net>
|
* @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
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
* @link https://git.timshomepage.net/aviat/Query
|
* @link https://git.timshomepage.net/aviat/Query
|
||||||
* @version 3.0.0
|
* @version 4.0.0
|
||||||
*/
|
*/
|
||||||
|
@ -105,11 +105,11 @@ class Util extends AbstractUtil {
|
|||||||
$row = array_values($row);
|
$row = array_values($row);
|
||||||
|
|
||||||
// Workaround for Quercus
|
// Workaround for Quercus
|
||||||
foreach($row as &$r)
|
// foreach($row as &$r)
|
||||||
{
|
// {
|
||||||
$r = $driver->quote($r);
|
// $r = $driver->quote($r);
|
||||||
}
|
// }
|
||||||
unset($r);
|
// unset($r);
|
||||||
$row = array_map('trim', $row);
|
$row = array_map('trim', $row);
|
||||||
|
|
||||||
$rowString = 'INSERT INTO `'.trim($t).'` (`'.implode('`,`', $columns).'`) VALUES ('.implode(',', $row).');';
|
$rowString = 'INSERT INTO `'.trim($t).'` (`'.implode('`,`', $columns).'`) VALUES ('.implode(',', $row).');';
|
||||||
|
@ -94,7 +94,7 @@ class QueryBuilderBase {
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* 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
|
// Create new State object
|
||||||
$this->state = new State();
|
$this->state = new State();
|
||||||
@ -526,13 +526,12 @@ class QueryBuilderBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the appropriate select query for the returning clause fallback
|
// Generate the appropriate select query for the returning clause fallback
|
||||||
|
// @TODO figure out how to do a proper fallback
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case QueryType::INSERT:
|
case QueryType::INSERT:
|
||||||
|
|
||||||
case QueryType::UPDATE:
|
case QueryType::UPDATE:
|
||||||
// @TODO figure out a good response for update query
|
|
||||||
break;
|
|
||||||
|
|
||||||
case QueryType::INSERT_BATCH:
|
case QueryType::INSERT_BATCH:
|
||||||
case QueryType::UPDATE_BATCH:
|
case QueryType::UPDATE_BATCH:
|
||||||
|
Loading…
Reference in New Issue
Block a user