You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the API only supports buffering the whole result set in memory. This makes sense for smaller result sets as working with an in-memory data structure with some dozens or hundreds of records works perfectly fine.
However, when processing larger result sets with hundreds or thousands of records, it would make sense to use a streaming approach so that one is no longer limited by memory in how many records can be processed.
Eventual API will use ReactPHP's existing stream API and could look something like this:
$stream = $db->queryStream('SELECT * FROM users');
$stream->on('data', function ($row) {
var_dump($row);
});
$stream->on('end', function () {
echo 'DONE' . PHP_EOL;
});
Currently, the API only supports buffering the whole result set in memory. This makes sense for smaller result sets as working with an in-memory data structure with some dozens or hundreds of records works perfectly fine.
However, when processing larger result sets with hundreds or thousands of records, it would make sense to use a streaming approach so that one is no longer limited by memory in how many records can be processed.
Eventual API will use ReactPHP's existing stream API and could look something like this:
Refs friends-of-reactphp/mysql#50
The text was updated successfully, but these errors were encountered: