begin with the interfaces

This commit is contained in:
Jan-Niclas Loosen 2025-01-23 01:45:05 +01:00
commit e2b4b7f330
3 changed files with 43 additions and 0 deletions

12
src/Query.php Normal file
View 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
View 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
View File

@ -0,0 +1,12 @@
<?php
namespace QueryBuilder;
interface Update
{
/**
* Finishes the database update.
* @return array Query Results
*/
public function query() : array;
}