-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
ResultStatement.php
76 lines (66 loc) · 2.73 KB
/
ResultStatement.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Driver;
use Traversable;
/**
* Interface for the reading part of a prepare statement only.
*/
interface ResultStatement extends Traversable
{
/**
* Closes the cursor, enabling the statement to be executed again.
*/
public function closeCursor() : void;
/**
* Returns the number of columns in the result set
*
* @return int The number of columns in the result set represented
* by the statement. If there is no result set,
* this method should return 0.
*/
public function columnCount() : int;
/**
* Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
* executed by the corresponding object.
*
* If the last SQL statement executed by the associated Statement object was a SELECT statement,
* some databases may return the number of rows returned by that statement. However,
* this behaviour is not guaranteed for all databases and should not be
* relied on for portable applications.
*/
public function rowCount() : int;
/**
* Sets the fetch mode to use while iterating this statement.
*
* @param int $fetchMode Controls how the next row will be returned to the caller.
* The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants.
*/
public function setFetchMode(int $fetchMode) : void;
/**
* Returns the next row of a result set.
*
* @param int|null $fetchMode Controls how the next row will be returned to the caller.
* The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants,
* defaulting to {@link \Doctrine\DBAL\FetchMode::MIXED}.
*
* @return mixed The return value of this method on success depends on the fetch mode. In all cases, FALSE is
* returned on failure.
*/
public function fetch(?int $fetchMode = null);
/**
* Returns an array containing all of the result set rows.
*
* @param int|null $fetchMode Controls how the next row will be returned to the caller.
* The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants,
* defaulting to {@link \Doctrine\DBAL\FetchMode::MIXED}.
*
* @return mixed[]
*/
public function fetchAll(?int $fetchMode = null) : array;
/**
* Returns a single column from the next row of a result set or FALSE if there are no more rows.
*
* @return mixed|false A single column in the next row of a result set, or FALSE if there are no more rows.
*/
public function fetchColumn();
}