update to build 417

This commit is contained in:
2021-09-01 14:14:00 +08:00
parent a13c4628f5
commit 229778ebf9
50 changed files with 1376 additions and 207 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace ZM\MySQL;
use Doctrine\DBAL\Query\QueryBuilder;
use ZM\Exception\DbException;
class MySQLQueryBuilder extends QueryBuilder
{
private $wrapper;
public function __construct(MySQLWrapper $wrapper) {
parent::__construct($wrapper->getConnection());
$this->wrapper = $wrapper;
}
/**
* @return int|MySQLStatementWrapper
* @throws DbException
*/
public function execute() {
if ($this->getType() === self::SELECT) {
return $this->wrapper->executeQuery($this->getSQL(), $this->getParameters(), $this->getParameterTypes());
}
return $this->wrapper->executeStatement($this->getSQL(), $this->getParameters(), $this->getParameterTypes());
}
}