Repository navigation
Internals Database Query SqlExpression
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/database/query/SqlExpression.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.
final readonly class SqlExpressionSource description (behavioral corrections are recorded in Known discrepancies):
Explicit supported SQL defaults; ordinary values remain bound parameters.
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 |
|---|---|---|
| $sql | public string $sql; |
Used by __construct(). |
| Constructor-promoted | public function __construct(string $sql) |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct(string $sql) |
public function __construct(string $sql)| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$sql |
string $sql |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
State writes: $this->sql.
Explicit exceptions: \InvalidArgumentException. The guards in the implementation below show when each is raised; exceptions from collaborators also propagate unless caught.
Implementation, validation guards and interaction order
public function __construct(string $sql)
{
$sql = strtoupper($sql);
if (!in_array($sql, ['DEFAULT', 'CURRENT_TIMESTAMP'], true)) {
throw new \InvalidArgumentException('Unsupported SQL expression.');
}
$this->sql = $sql;
}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