Files
oficial/app/common/Define/Connection.php
Juan Pablo Vial 8f16f33a1e Cleanup
2025-03-03 14:57:22 -03:00

45 lines
905 B
PHP

<?php
namespace Incoviba\Common\Define;
use PDO;
use PDOStatement;
use PDOException;
interface Connection
{
/**
* @return Connection
* @throws PDOException
*/
public function connect(): Connection;
/**
* @param string $query
* @return PDOStatement
* @throws PDOException
*/
public function query(string $query): PDOStatement;
/**
* @param string $query
* @return PDOStatement
* @throws PDOException
*/
public function prepare(string $query): PDOStatement;
/**
* @param string $query
* @param array|null $data
* @return PDOStatement
* @throws PDOException
*/
public function execute(string $query, ?array $data = null): PDOStatement;
/**
* @return PDO
* @throws PDOException
*/
public function getPDO(): PDO;
public function getQueryBuilder(): Query\Builder;
}