begin with the interfaces
This commit is contained in:
commit
e2b4b7f330
12
src/Query.php
Normal file
12
src/Query.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace QueryBuilder;
|
||||
|
||||
interface Query
|
||||
{
|
||||
/**
|
||||
* Finishes the database query.
|
||||
* @return array Query Results
|
||||
*/
|
||||
public function query() : array;
|
||||
}
|
19
src/QueryBuilder.php
Normal file
19
src/QueryBuilder.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace QueryBuilder;
|
||||
|
||||
interface QueryBuilder
|
||||
{
|
||||
/**
|
||||
* Initializes a Query instance.
|
||||
* @param string ...$tableNames Instance will query on the joined tables.
|
||||
* @return Query Generated instance to build on.
|
||||
*/
|
||||
public static function makeQuery(string ...$tableNames) : Query;
|
||||
|
||||
/**
|
||||
* Initializes an Update instance.
|
||||
* @param string ...$tableNames Instance will update on the joined tables.
|
||||
* @return Update Generated instance to build on.
|
||||
*/
|
||||
public static function makeUpdate(string ...$tableNames) : Update;
|
||||
}
|
12
src/Update.php
Normal file
12
src/Update.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace QueryBuilder;
|
||||
|
||||
interface Update
|
||||
{
|
||||
/**
|
||||
* Finishes the database update.
|
||||
* @return array Query Results
|
||||
*/
|
||||
public function query() : array;
|
||||
}
|
Loading…
Reference in New Issue
Block a user