final class Detach
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to remove an attached database from the connection.

Rule: SQLITE-DETACH-001. The schema name is an expression evaluated where no relation is visible; an operand that is a single identifier is the text of its name (NameOperand). The optional DATABASE keyword is not written. Whether the schema is attached is connection state and no fact of the model. Source: https://sqlite.org/lang_detach.html. Status: Implemented.

Reading the schema a detach request namesdoctest
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('DETACH DATABASE aux')->statement->schema->name->value // => 'aux'

Properties§

public Scalar $schema

Methods§

public function __construct(public Scalar $schema)

Parameters

$schemaScalarThe expression that names the schema
public function deriveStatement(Derivation $derivation): void

Derives the operand where no relation is visible.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 1

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 4

Relations§

Instantiated in 1