final class ColumnCompression
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The COMPRESSION clause of a column: the compression method of its values, or DEFAULT.

Mirrors the compression field of PostgreSQL's ColumnDef (and of AT_SetCompression). The method name is checked by the server. Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Reading the compression of a columndoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a text COMPRESSION DEFAULT)');
    $create->statement->definition->elements[0]->compression->method // => null

Properties§

public Name|null $method

Methods§

public function __construct(public Name|null $method)

Parameters

$methodName|nullThe method; null for DEFAULT
public function render(Output $out): void

Writes COMPRESSION and the method or DEFAULT.

Parameters

$outOutput
Calls 2

Test cases 2§

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 1

Relations§

Instantiated in 2
Type declarations 3