Files
oficial/app/common/Define/Connection.php

45 lines
905 B
PHP
Raw Normal View History

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