Flow PHP

PostgreSqlCursorExtractor implements Extractor

FinalYes

PostgreSQL extractor using server-side cursors for memory-efficient extraction.

Uses DECLARE CURSOR + FETCH to stream data from PostgreSQL without loading the entire result set into memory. This is the only way to achieve true low memory extraction with PHP's ext-pgsql.

Note: Requires a transaction context (auto-started if not in one).

Interfaces

Extractor

Methods

__construct()  : mixed
extract()  : Generator
withCursorName()  : self
withFetchSize()  : self
withMaximum()  : self
withSchema()  : self

Methods

__construct()

public __construct(Client $client, string|SqlQuery $query[, array<int, mixed> $parameters = [] ]) : mixed
Parameters
$client : Client
$query : string|SqlQuery
$parameters : array<int, mixed> = []

extract()

public extract(FlowContext $context) : Generator
Parameters
$context : FlowContext
Return values
Generator

withCursorName()

public withCursorName(string $cursorName) : self
Parameters
$cursorName : string
Return values
self

withFetchSize()

public withFetchSize(int $fetchSize) : self
Parameters
$fetchSize : int
Return values
self

        
On this page

Search results