3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\DBAL\Driver;
25 * Interface for the reading part of a prepare statement only.
27 * @author Benjamin Eberlei <kontakt@beberlei.de>
29 interface ResultStatement extends \Traversable
32 * Closes the cursor, enabling the statement to be executed again.
34 * @return boolean Returns TRUE on success or FALSE on failure.
36 function closeCursor();
41 * Returns the number of columns in the result set
43 * @return integer Returns the number of columns in the result set represented
44 * by the PDOStatement object. If there is no result set,
45 * this method should return 0.
47 function columnCount();
51 * Set the fetch mode to use while iterating this statement.
53 * @param integer $fetchMode
55 function setFetchMode($fetchMode, $arg2 = null, $arg3 = null);
60 * @see Query::HYDRATE_* constants
61 * @param integer $fetchMode Controls how the next row will be returned to the caller.
62 * This value must be one of the Query::HYDRATE_* constants,
63 * defaulting to Query::HYDRATE_BOTH
67 function fetch($fetchMode = null);
70 * Returns an array containing all of the result set rows
72 * @param integer $fetchMode Controls how the next row will be returned to the caller.
73 * This value must be one of the Query::HYDRATE_* constants,
74 * defaulting to Query::HYDRATE_BOTH
78 function fetchAll($fetchMode = null);
82 * Returns a single column from the next row of a
83 * result set or FALSE if there are no more rows.
85 * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
86 * value is supplied, PDOStatement->fetchColumn()
87 * fetches the first column.
89 * @return string returns a single column in the next row of a result set.
91 function fetchColumn($columnIndex = 0);