EntryTypesMap
Read onlyYes
FinalYes
Maps between Flow ETL types and PostgreSQL types.
Constants
- DEFAULT_TYPES : array<string|int, mixed> = [\Flow\Types\Type\Native\StringType::class => \...
- Default mapping of Flow type classes to PostgreSQL value types.
Methods
- __construct() : mixed
- map() : TypedValue|null
- Maps a column value + Flow type 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 Flow type classes to PostgreSQL value types.
public
array<string|int, mixed>
DEFAULT_TYPES
= [\Flow\Types\Type\Native\StringType::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\Types\Type\Native\IntegerType::class => \Flow\PostgreSql\Client\Types\ValueType::INT8, \Flow\Types\Type\Native\FloatType::class => \Flow\PostgreSql\Client\Types\ValueType::FLOAT8, \Flow\Types\Type\Native\BooleanType::class => \Flow\PostgreSql\Client\Types\ValueType::BOOL, \Flow\Types\Type\Logical\DateType::class => \Flow\PostgreSql\Client\Types\ValueType::DATE, \Flow\Types\Type\Logical\DateTimeType::class => \Flow\PostgreSql\Client\Types\ValueType::TIMESTAMP, \Flow\Types\Type\Logical\TimeType::class => \Flow\PostgreSql\Client\Types\ValueType::TIME, \Flow\Types\Type\Logical\UuidType::class => \Flow\PostgreSql\Client\Types\ValueType::UUID, \Flow\Types\Type\Logical\JsonType::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\Types\Type\Logical\XMLType::class => \Flow\PostgreSql\Client\Types\ValueType::XML, \Flow\Types\Type\Logical\XMLElementType::class => \Flow\PostgreSql\Client\Types\ValueType::XML, \Flow\Types\Type\Logical\HTMLType::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\Types\Type\Logical\HTMLElementType::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\Types\Type\Native\EnumType::class => \Flow\PostgreSql\Client\Types\ValueType::TEXT, \Flow\Types\Type\Logical\ListType::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\Types\Type\Logical\MapType::class => \Flow\PostgreSql\Client\Types\ValueType::JSONB, \Flow\Types\Type\Logical\StructureType::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> = []
map()
Maps a column value + Flow type to a TypedValue suitable for PostgreSQL queries.
public
map(string $column, Type<string|int, mixed> $type, mixed $value) : TypedValue|null
Parameters
- $column : string
- $type : Type<string|int, mixed>
- $value : 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