classVacuum
final class Vacuum
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to rebuild a database file, optionally into a new file.
Rule: SQLITE-VACUUM-001. The optional name is a schema name; without it the main schema is rebuilt. The INTO operand is an expression that yields the file name; it is derived at a position that sees no relation, so a column name in it is a missing column. Source: https://sqlite.org/lang_vacuum.html. Status: Implemented.
$vacuum = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze("VACUUM main INTO 'backup.db'");
[$vacuum->statement->schema?->value, $vacuum->statement->into !== null] // => ['main', true]Properties§
public Name|null $schema = nullpublic Scalar|null $into = nullMethods§
public function __construct(public Name|null $schema = null, public Scalar|null $into = null)Parameters
$schema | Name|null | The schema to rebuild; null is the main schema |
$into | Scalar|null | The expression that names the file to write the rebuilt database to |
public function deriveStatement(Derivation $derivation): voidDerives the file name expression where no relation is visible.
Parameters
$derivation | Derivation |
Calls 2
- method-call Derivation::scalar() line 47
- method-call Derivation::environment() line 47
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 56
- method-call Output::name() line 58
- class-const NameUse::Qualifier() line 58
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 2
Relations§
Instantiated in 2
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\MaintenanceRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/MaintenanceRule.php:50
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\MaintenanceRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/MaintenanceRule.php:51