|
@@ -763,7 +763,22 @@ 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($options);die;
|
|
|
|
|
|
+ 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;
|
|
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%'],
|
|
[
|
|
[
|