|
@@ -763,22 +763,26 @@ abstract class BaseBuilder
|
|
public function select(Query $query, bool $one = false): string
|
|
public function select(Query $query, bool $one = false): string
|
|
{
|
|
{
|
|
$options = $query->getOptions();
|
|
$options = $query->getOptions();
|
|
- var_dump([
|
|
|
|
- $this->parseTable($query, $options['table']),
|
|
|
|
- $this->parseDistinct($query, $options['distinct']),
|
|
|
|
- $this->parseExtra($query, $options['extra']),
|
|
|
|
- $this->parseField($query, $options['field'] ?? []),
|
|
|
|
- $this->parseJoin($query, $options['join']),
|
|
|
|
- $this->parseWhere($query, $options['where']),
|
|
|
|
- $this->parseGroup($query, $options['group']),
|
|
|
|
- $this->parseHaving($query, $options['having']),
|
|
|
|
- $this->parseOrder($query, $options['order']),
|
|
|
|
- $this->parseLimit($query, $one ? '1' : $options['limit']),
|
|
|
|
- $this->parseUnion($query, $options['union']),
|
|
|
|
- $this->parseLock($query, $options['lock']),
|
|
|
|
- $this->parseComment($query, $options['comment']),
|
|
|
|
- $this->parseForce($query, $options['force']),
|
|
|
|
- ]);die;
|
|
|
|
|
|
+ var_dump(str_replace(
|
|
|
|
+ ['%TABLE%', '%DISTINCT%', '%EXTRA%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'],
|
|
|
|
+ [
|
|
|
|
+ $this->parseTable($query, $options['table']),
|
|
|
|
+ $this->parseDistinct($query, $options['distinct']),
|
|
|
|
+ $this->parseExtra($query, $options['extra']),
|
|
|
|
+ $this->parseField($query, $options['field'] ?? []),
|
|
|
|
+ $this->parseJoin($query, $options['join']),
|
|
|
|
+ $this->parseWhere($query, $options['where']),
|
|
|
|
+ $this->parseGroup($query, $options['group']),
|
|
|
|
+ $this->parseHaving($query, $options['having']),
|
|
|
|
+ $this->parseOrder($query, $options['order']),
|
|
|
|
+ $this->parseLimit($query, $one ? '1' : $options['limit']),
|
|
|
|
+ $this->parseUnion($query, $options['union']),
|
|
|
|
+ $this->parseLock($query, $options['lock']),
|
|
|
|
+ $this->parseComment($query, $options['comment']),
|
|
|
|
+ $this->parseForce($query, $options['force']),
|
|
|
|
+ ],
|
|
|
|
+ $this->selectSql
|
|
|
|
+ ));die;
|
|
return str_replace(
|
|
return str_replace(
|
|
['%TABLE%', '%DISTINCT%', '%EXTRA%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'],
|
|
['%TABLE%', '%DISTINCT%', '%EXTRA%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'],
|
|
[
|
|
[
|