flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ~0.30.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


/**
 * Declare a server-side cursor for a query.
 *
 * Cursors must be declared within a transaction and provide memory-efficient
 * iteration over large result sets via FETCH commands.
 *
 * Example with query builder:
 *   declare_cursor('my_cursor', select(star())->from(table('users')))->noScroll()
 *   Produces: DECLARE my_cursor NO SCROLL CURSOR FOR SELECT * FROM users
 *
 * Example with raw SQL:
 *   declare_cursor('my_cursor', 'SELECT * FROM users WHERE active = true')->withHold()
 *   Produces: DECLARE my_cursor NO SCROLL CURSOR WITH HOLD FOR SELECT * FROM users WHERE active = true
 *
 * @param string $cursorName Unique cursor name
 * @param SelectFinalStep|SqlQuery|string $query Query to iterate over
 */
declare_cursor(string $cursorName, SelectFinalStep|SqlQuery|string $query) : DeclareCursorOptionsStep

Contributors

Join us on GitHub external resource
scroll back to top