enum Alignment: string
    implements Choice
Public API: explicitly declared with @visibility public.

The alignment attribute of a base type: the storage alignment of its values.

DefineType compares the text without regard to case, and accepts the names an unquoted type keyword is translated to: double precision reads as pg_catalog.float8, integer as pg_catalog.int4, smallint as pg_catalog.int2 and char as pg_catalog.bpchar. Source: https://www.postgresql.org/docs/17/sql-createtype.html, DefineType in src/backend/commands/typecmds.c of PostgreSQL 17.

Reading an alignment written as a type keyworddoctest
\SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Choice\Alignment::read('pg_catalog.int4')?->name // => 'Int'

Cases§

case Char = 'char'
case Short = 'int2'
case Int = 'int4'
case Double = 'double'

Methods§

public static function read(string $text): ?self

Answers the alignment the text names without regard to case, or null.

Parameters

$textstring

Returns

?self
Test cases 3
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private const SPELLINGS = ['double' => self::Double, 'float8' => self::Double, 'pg_catalog.float8' => sel…

Test cases 7§

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 5

Relations§

Constant reads 1