1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-11 16:44:30 +02:00

Result::fetch() removed typehint (#257)

This commit is contained in:
Jan Pecha
2017-07-22 11:14:39 +02:00
committed by David Grudl
parent 2d5ac775bc
commit afe728d07a
2 changed files with 11 additions and 1 deletions

View File

@@ -52,6 +52,15 @@ Assert::equal([
], iterator_to_array($res));
// fetch row by row as array
$res = $conn->query('SELECT * FROM [products] ORDER BY product_id')->setRowClass(null);
Assert::equal([
['product_id' => num(1), 'title' => 'Chair'],
['product_id' => num(2), 'title' => 'Table'],
['product_id' => num(3), 'title' => 'Computer'],
], iterator_to_array($res));
// fetch complete result set like association array
$res = $conn->query('SELECT * FROM [products] ORDER BY product_id');
Assert::equal([