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.

Reading the schema and the target of a vacuumdoctest
$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 = null
public Scalar|null $into = null

Methods§

public function __construct(public Name|null $schema = null, public Scalar|null $into = null)

Parameters

$schemaName|nullThe schema to rebuild; null is the main schema
$intoScalar|nullThe expression that names the file to write the rebuilt database to
public function deriveStatement(Derivation $derivation): void

Derives the file name expression where no relation is visible.

Parameters

$derivationDerivation
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 3

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