classColumnCompression
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.
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a text COMPRESSION DEFAULT)');
$create->statement->definition->elements[0]->compression->method // => nullProperties§
public Name|null $methodMethods§
public function __construct(public Name|null $method)Parameters
$method | Name|null | The method; null for DEFAULT |
public function render(Output $out): voidWrites COMPRESSION and the method or DEFAULT.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 40
- method-call Output::name() line 44
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnCompressionTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 2
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Lowering\Table\ColumnRule packages/sql-semantics-postgres/src/Lowering/Table/ColumnRule.php:199
- type SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\Column\ColumnStorageChange packages/sql-semantics-postgres/src/Statement/Table/Alter/Column/ColumnStorageChange.php:36
- type SqlSemantics\Platform\PostgreSql\Statement\Table\Element\ColumnDefinition packages/sql-semantics-postgres/src/Statement/Table/Element/ColumnDefinition.php:64