This commit is contained in:
2026-06-30 23:14:22 +08:00
parent 28fa17ecfb
commit ce92f310a5
+4 -4
View File
@@ -216,7 +216,7 @@ class SqlBuilder extends Component
public function one(): string
{
$this->query->offset(0)->limit(1);
return $this->makeSelect($this->query) . $this->make() . $this->makeLimit();
return join('', [$this->makeSelect($this->query), $this->make(), $this->makeLimit()]);
}
@@ -226,7 +226,7 @@ class SqlBuilder extends Component
*/
public function all(): string
{
return $this->makeSelect($this->query) . $this->make() . $this->makeLimit();
return join('', [$this->makeSelect($this->query), $this->make(), $this->makeLimit()]);
}
@@ -236,7 +236,7 @@ class SqlBuilder extends Component
*/
public function count(): string
{
return $this->makeSelect(['COUNT(*)']) . $this->make();
return join(' ', [$this->makeSelect(['COUNT(*)']), $this->make()]);
}
@@ -246,7 +246,7 @@ class SqlBuilder extends Component
*/
public function exists(): string
{
return $this->makeSelect(['0']) . $this->make();
return join(' ', [$this->makeSelect(['0']), $this->make()]);
}