Repository navigation
Internals Database Creator Table TableSchemaProvider
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/database/creator/table/TableSchemaProvider.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.
use database\creator\interface\ITableSchemaProvider;
use database\interface\IProvider;class TableSchemaProvider implements ITableSchemaProviderSource description (behavioral corrections are recorded in Known discrepancies):
TableSchemaProvider
Executes DDL statements (CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE INDEX, DROP INDEX) against the database by delegating to IProvider.
DDL statements are passed as complete SQL strings with no PDO bindings. IProvider::execute() accepts an empty bindings array for this purpose.
This class never constructs SQL itself; that is TableWizard's responsibility. It only receives a finished SQL string and runs it.
Declarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| Constructor-promoted | private readonly IProvider $provider |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct( private readonly IProvider $provider, ) |
| executeDDL | public function executeDDL(string $sql): bool |
public function __construct(
private readonly IProvider $provider,
);| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$provider |
private readonly IProvider $provider |
The database execution provider. |
@param IProvider $provider The database execution provider.
Concrete no-op/default hook: this method performs no work. Override it where the lifecycle or extension contract calls for behavior.
public function executeDDL(string $sql): bool| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$sql |
string $sql |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
{@inheritdoc}
The statement is executed with an empty bindings array because DDL never uses parameterised placeholders.
Return expressions (including local callbacks): true.
Implementation, validation guards and interaction order
/**
* {@inheritdoc}
*
* The statement is executed with an empty bindings array because DDL
* never uses parameterised placeholders.
*/
public function executeDDL(string $sql): bool
{
$stmt = $this->provider->execute($sql, []);
$stmt->closeCursor();
return true;
}AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes