EntryTypesMap
Read onlyYes
FinalYes
Maps between Flow ETL types and PostgreSQL types.
Constants
- DEFAULT_TYPES : array<string|int, mixed> = [\Flow\ETL\Row\Entry\StringEntry::class => \Flo...
- Default mapping of Entry classes to PostgreSQL types.
Methods
- __construct() : mixed
- mapEntry() : TypedValue|null
- Maps an Entry to a TypedValue suitable for PostgreSQL queries.
- toColumnType() : ColumnType
- Maps a Flow type to a PostgreSQL DDL column type.
- toFlowType() : Type<string|int, mixed>
- Maps a PostgreSQL DDL column type back to a canonical Flow type.
Constants
DEFAULT_TYPES
Default mapping of Entry classes to PostgreSQL types.
public
array<string|int, mixed>
DEFAULT_TYPES
= [\Flow\ETL\Row\Entry\StringEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\ETL\Row\Entry\IntegerEntry::class => \Flow\PostgreSql\Client\Types\ValueType::INT8, \Flow\ETL\Row\Entry\FloatEntry::class => \Flow\PostgreSql\Client\Types\ValueType::FLOAT8, \Flow\ETL\Row\Entry\BooleanEntry::class => \Flow\PostgreSql\Client\Types\ValueType::BOOL, \Flow\ETL\Row\Entry\DateEntry::class => \Flow\PostgreSql\Client\Types\ValueType::DATE, \Flow\ETL\Row\Entry\DateTimeEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TIMESTAMPTZ, \Flow\ETL\Row\Entry\TimeEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TIME, \Flow\ETL\Row\Entry\UuidEntry::class => \Flow\PostgreSql\Client\Types\ValueType::UUID, \Flow\ETL\Row\Entry\JsonEntry::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\ETL\Row\Entry\XMLEntry::class => \Flow\PostgreSql\Client\Types\ValueType::XML, \Flow\ETL\Row\Entry\XMLElementEntry::class => \Flow\PostgreSql\Client\Types\ValueType::XML, \Flow\ETL\Row\Entry\HTMLEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\ETL\Row\Entry\HTMLElementEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\ETL\Row\Entry\EnumEntry::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\ETL\Row\Entry\ListEntry::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\ETL\Row\Entry\MapEntry::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\ETL\Row\Entry\StructureEntry::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB]
Methods
__construct()
public
__construct([array<string|int, mixed> $overrides = [] ][, array<string|int, mixed> $columnTypeOverrides = [] ]) : mixed
Parameters
- $overrides : array<string|int, mixed> = []
- $columnTypeOverrides : array<string|int, mixed> = []
mapEntry()
Maps an Entry to a TypedValue suitable for PostgreSQL queries.
public
mapEntry(Entry<string|int, mixed> $entry) : TypedValue|null
Parameters
- $entry : Entry<string|int, mixed>
Tags
Return values
TypedValue|nulltoColumnType()
Maps a Flow type to a PostgreSQL DDL column type.
public
toColumnType(Type<string|int, mixed> $type) : ColumnType
Parameters
- $type : Type<string|int, mixed>
Tags
Return values
ColumnTypetoFlowType()
Maps a PostgreSQL DDL column type back to a canonical Flow type.
public
toFlowType(ColumnType $columnType) : Type<string|int, mixed>
Parameters
- $columnType : ColumnType