Skip to content

Internals Database Interface IProvider

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

database\interface\IProvider

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/database/interface/IProvider.php · Snapshot 8411f4287706.

DatabaseManager delegates SQL generation to QueryBuilder, execution to IProvider, and result caching to ICache. Schema builders use MySQL DDL and the framework table registry.

Imports and dependencies

use PDOStatement;

IProvider

Declaration and architectural role

interface IProvider

Source description (behavioral corrections are recorded in Known discrepancies):

Contract for a database execution provider.

Decouples the rest of the system from the concrete PDO implementation, making it easy to swap drivers or inject test doubles.

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
execute public function execute(string $sql, array $bindings = []): PDOStatement
lastInsertId public function lastInsertId(): int

execute

Source line 23

public function execute(string $sql, array $bindings = []): PDOStatement;

Parameters

Parameter Type, modifiers and default Purpose
$sql string $sql Parameterised SQL string.
$bindings array $bindings = [] Placeholder → value map.

Prepare, bind, and execute a SQL statement.

@param string $sql Parameterised SQL string. @param array $bindings Placeholder → value map.

@return PDOStatement The executed (open cursor) statement.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

lastInsertId

Source line 28

public function lastInsertId(): int;

Return the auto-increment ID produced by the last INSERT.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Clone this wiki locally