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