Interfaces
This commit is contained in:
10
src/Concept/Database/Query/Delete.php
Normal file
10
src/Concept/Database/Query/Delete.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace ProVM\Concept\Database\Query;
|
||||
|
||||
use ProVM\Concept\Database\Query;
|
||||
|
||||
interface Delete extends Query
|
||||
{
|
||||
public function from(string $table): Delete;
|
||||
public function where(array $conditions): Delete;
|
||||
}
|
12
src/Concept/Database/Query/Insert.php
Normal file
12
src/Concept/Database/Query/Insert.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace ProVM\Concept\Database\Query;
|
||||
|
||||
use ProVM\Concept\Database\Query;
|
||||
|
||||
interface Insert extends Query
|
||||
{
|
||||
public function into(string $table): Insert;
|
||||
public function columns(array $columns): Insert;
|
||||
public function values(array $values): Insert;
|
||||
public function select(Select $select): Insert;
|
||||
}
|
15
src/Concept/Database/Query/Select.php
Normal file
15
src/Concept/Database/Query/Select.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace ProVM\Concept\Database\Query;
|
||||
|
||||
use ProVM\Concept\Database\Query;
|
||||
|
||||
interface Select extends Query
|
||||
{
|
||||
public function select(array $columns = ['*']): Select;
|
||||
public function from(string $table): Select;
|
||||
public function joins(array $joins): Select;
|
||||
public function where(array $conditions): Select;
|
||||
public function groupBy(array $grouping): Select;
|
||||
public function having(array $having): Select;
|
||||
public function orderBy(array $ordering): Select;
|
||||
}
|
11
src/Concept/Database/Query/Update.php
Normal file
11
src/Concept/Database/Query/Update.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace ProVM\Concept\Database\Query;
|
||||
|
||||
use ProVM\Concept\Database\Query;
|
||||
|
||||
interface Update extends Query
|
||||
{
|
||||
public function table(string $table): Update;
|
||||
public function set(array $value_pairs): Update;
|
||||
public function where(array $conditions): Update;
|
||||
}
|
Reference in New Issue
Block a user