4 Commits

Author SHA1 Message Date
a22a927bb4 FIX: make instead of get 2022-09-09 14:09:13 -04:00
758a4b7c7f Make new queries instead of reuse 2022-09-09 14:07:27 -04:00
2fd0af5c2f FIX 2022-09-09 12:19:03 -04:00
97d5ae8450 FIX: * columns in select 2022-09-09 12:15:22 -04:00
2 changed files with 8 additions and 4 deletions

View File

@ -51,6 +51,10 @@ abstract class Select extends Query implements SelectInterface
}
public function addColumn(string $column, ?string $alias = null): SelectInterface
{
if ($column === '*') {
$this->columns []= $column;
return $this;
}
$a = '';
if ($alias !== null) {
$a = " AS '{$alias}'";

View File

@ -20,18 +20,18 @@ class QueryBuilder implements QBInterface
public function select(array $columns = ['*']): Select
{
return $this->getContainer()->get(Select::class)->select($columns);
return $this->getContainer()->make(Select::class)->select($columns);
}
public function insert(string $table): Insert
{
return $this->getContainer()->get(Insert::class)->into($table);
return $this->getContainer()->make(Insert::class)->into($table);
}
public function update(string $table): Update
{
return $this->getContainer()->get(Update::class)->table($table);
return $this->getContainer()->make(Update::class)->table($table);
}
public function delete(string $table): Delete
{
return $this->getContainer()->get(Delete::class)->from($table);
return $this->getContainer()->make(Delete::class)->from($table);
}
}