flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ~0.29.0

ChangelogRelease Cycle

play Try Flow Online

elephant
extract

Extracts

Read from various data sources.

arrow
transform

Transforms

Shape and optimize for your needs.

arrow
load

Loads

Store and secure in one of many available data sinks.


Definition


/**
 * Wrap a value with explicit PostgreSQL type information for parameter binding.
 *
 * Use when auto-detection isn't sufficient or when you need to specify
 * the exact PostgreSQL type (since one PHP type can map to multiple PostgreSQL types):
 * - int could be INT2, INT4, or INT8
 * - string could be TEXT, VARCHAR, or CHAR
 * - array must always use typed() since auto-detection cannot determine element type
 * - DateTimeInterface could be TIMESTAMP or TIMESTAMPTZ
 * - Json could be JSON or JSONB
 *
 * @param mixed $value The value to bind
 * @param PostgreSqlType $targetType The PostgreSQL type to convert the value to
 *
 * @example
 * $client->fetch(
 *     'SELECT * FROM users WHERE id = $1 AND tags = $2',
 *     [
 *         typed('550e8400-e29b-41d4-a716-446655440000', PostgreSqlType::UUID),
 *         typed(['tag1', 'tag2'], PostgreSqlType::TEXT_ARRAY),
 *     ]
 * );
 */
typed(?mixed $value, PostgreSqlType $targetType) : TypedValue

Contributors

Join us on GitHub external resource
scroll back to top