Files
mariavel/backend/app/Contracts/DatabaseDriverInterface.php
T

32 lines
652 B
PHP

<?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 table schema.
*/
public function getTableSchema(string $table): array;
/**
* Get table data.
*/
public function getTableData(string $table, int $limit = 100, int $offset = 0): array;
/**
* Get the underlying connection instance.
*/
public function getConnection();
}