final class DatabaseEncryption
    implements DatabaseOption
    uses Snapshot
Public API: explicitly declared with @visibility public.

[DEFAULT] ENCRYPTION [=] {'Y' | 'N'}: the default encryption of the database's tables (MySQL 8.0.16 and later).

DEFAULT before the option is optional and always written, because ENCRYPTION right after ALTER DATABASE would be read as the database name; the equals sign is optional and not written. The server checks the value when it executes the statement. Source: https://dev.mysql.com/doc/refman/8.4/en/create-database.html.

Reading the encryptiondoctest
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("CREATE DATABASE d ENCRYPTION 'Y'");
    $create->statement->options[0]->encryption->value // => 'Y'

Properties§

public Text $encryption

Methods§

public function __construct(public Text $encryption)

Parameters

$encryptionTextThe value, 'Y' or 'N' for the server
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Calls 1

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1