1<?php 2 3declare(strict_types=1); 4 5namespace Doctrine\DBAL\Driver; 6 7/** 8 * Driver-level result statement execution result. 9 */ 10interface Result 11{ 12 /** 13 * Returns the next row of the result as a numeric array or FALSE if there are no more rows. 14 * 15 * @return array<int,mixed>|false 16 * 17 * @throws Exception 18 */ 19 public function fetchNumeric(); 20 21 /** 22 * Returns the next row of the result as an associative array or FALSE if there are no more rows. 23 * 24 * @return array<string,mixed>|false 25 * 26 * @throws Exception 27 */ 28 public function fetchAssociative(); 29 30 /** 31 * Returns the first value of the next row of the result or FALSE if there are no more rows. 32 * 33 * @return mixed|false 34 * 35 * @throws Exception 36 */ 37 public function fetchOne(); 38 39 /** 40 * Returns an array containing all of the result rows represented as numeric arrays. 41 * 42 * @return array<int,array<int,mixed>> 43 * 44 * @throws Exception 45 */ 46 public function fetchAllNumeric(): array; 47 48 /** 49 * Returns an array containing all of the result rows represented as associative arrays. 50 * 51 * @return array<int,array<string,mixed>> 52 * 53 * @throws Exception 54 */ 55 public function fetchAllAssociative(): array; 56 57 /** 58 * Returns an array containing the values of the first column of the result. 59 * 60 * @return array<int,mixed> 61 * 62 * @throws Exception 63 */ 64 public function fetchFirstColumn(): array; 65 66 /** 67 * Returns the number of rows affected by the DELETE, INSERT, or UPDATE statement that produced the result. 68 * 69 * If the statement executed a SELECT query or a similar platform-specific SQL (e.g. DESCRIBE, SHOW, etc.), 70 * some database drivers may return the number of rows returned by that query. However, this behaviour 71 * is not guaranteed for all drivers and should not be relied on in portable applications. 72 * 73 * @return int The number of rows. 74 */ 75 public function rowCount(); 76 77 /** 78 * Returns the number of columns in the result 79 * 80 * @return int The number of columns in the result. If the columns cannot be counted, 81 * this method must return 0. 82 */ 83 public function columnCount(); 84 85 /** 86 * Discards the non-fetched portion of the result, enabling the originating statement to be executed again. 87 */ 88 public function free(): void; 89} 90