feat: add DatabaseDriverInterface to define base database operations
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Contracts;
|
||||||
|
|
||||||
|
interface DatabaseDriverInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Set the connection parameters and establish a connection.
|
||||||
|
*/
|
||||||
|
public function connect(array $config): bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute a raw query.
|
||||||
|
*/
|
||||||
|
public function query(string $sql, array $bindings = []): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the underlying connection instance.
|
||||||
|
*/
|
||||||
|
public function getConnection();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user