1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Doctrine\DBAL; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Contains statement fetch modes. |
7
|
|
|
*/ |
8
|
|
|
final class FetchMode |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Specifies that the fetch method shall return each row as an array indexed |
12
|
|
|
* by column name as returned in the corresponding result set. If the result |
13
|
|
|
* set contains multiple columns with the same name, the statement returns |
14
|
|
|
* only a single value per column name. |
15
|
|
|
* |
16
|
|
|
* @see \PDO::FETCH_ASSOC |
17
|
|
|
*/ |
18
|
|
|
public const ASSOCIATIVE = \PDO::FETCH_ASSOC; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Specifies that the fetch method shall return each row as an array indexed |
22
|
|
|
* by column number as returned in the corresponding result set, starting at |
23
|
|
|
* column 0. |
24
|
|
|
* |
25
|
|
|
* @see \PDO::FETCH_NUM |
26
|
|
|
*/ |
27
|
|
|
public const NUMERIC = \PDO::FETCH_NUM; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Specifies that the fetch method shall return each row as an array indexed |
31
|
|
|
* by both column name and number as returned in the corresponding result set, |
32
|
|
|
* starting at column 0. |
33
|
|
|
* |
34
|
|
|
* @see \PDO::FETCH_BOTH |
35
|
|
|
*/ |
36
|
|
|
public const MIXED = \PDO::FETCH_BOTH; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Specifies that the fetch method shall return each row as an object with |
40
|
|
|
* property names that correspond to the column names returned in the result |
41
|
|
|
* set. |
42
|
|
|
* |
43
|
|
|
* @see \PDO::FETCH_OBJ |
44
|
|
|
*/ |
45
|
|
|
public const STANDARD_OBJECT = \PDO::FETCH_OBJ; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Specifies that the fetch method shall return only a single requested |
49
|
|
|
* column from the next row in the result set. |
50
|
|
|
* |
51
|
|
|
* @see \PDO::FETCH_COLUMN |
52
|
|
|
*/ |
53
|
|
|
public const COLUMN = \PDO::FETCH_COLUMN; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Specifies that the fetch method shall return a new instance of the |
57
|
|
|
* requested class, mapping the columns to named properties in the class. |
58
|
|
|
* |
59
|
|
|
* @see \PDO::FETCH_CLASS |
60
|
|
|
*/ |
61
|
|
|
public const CUSTOM_OBJECT = \PDO::FETCH_CLASS; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* This class cannot be instantiated. |
65
|
|
|
*/ |
66
|
|
|
private function __construct() |
67
|
|
|
{ |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|