Reorder and new queries, also change to Query/Builder

This commit is contained in:
2023-02-28 23:47:02 -03:00
parent 849d42ea57
commit d266008224
33 changed files with 839 additions and 612 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace ProVM\Implement\Database\Query;
use ProVM\Concept\Database;
use ProVM\Implement\Database\Query;
abstract class Delete extends Query implements Database\Query\Delete
{
use hasTable, hasConditions;
public function from(string $table): Database\Query\Delete
{
return $this->setTable($table);
}
public function where(array|string $conditions): Database\Query\Delete
{
return $this->setConditions($conditions);
}
public function build(): string
{
return implode('', [
"DELETE FROM {$this->getTable()}",
$this->getConditionsString()
]);
}
}