 core/lib/Drupal/Core/Database/StatementInterface.php |    4 +++-
 core/lib/Drupal/Core/Database/StatementPrefetch.php  |    6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php
index 7f1ca4a..ae1bc36 100644
--- a/core/lib/Drupal/Core/Database/StatementInterface.php
+++ b/core/lib/Drupal/Core/Database/StatementInterface.php
@@ -137,13 +137,15 @@ interface StatementInterface extends Traversable {
    *   One of the PDO::FETCH_* constants.
    * @param $column_index
    *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   *   If $mode is PDO::FETCH_CLASS, the name of the class of each returned
+   *    array element, mapping the columns of each row to named properties of the class.
    * @param $constructor_arguments
    *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
    *
    * @return
    *   An array of results.
    */
-  // function fetchAll($mode = NULL, $column_index = NULL, array $constructor_arguments);
+  function fetchAll($mode = NULL, $column_index = NULL, array $constructor_arguments);
 
   /**
    * Returns an entire single column of a result set as an indexed array.
diff --git a/core/lib/Drupal/Core/Database/StatementPrefetch.php b/core/lib/Drupal/Core/Database/StatementPrefetch.php
index 18dd582..597fe3a 100644
--- a/core/lib/Drupal/Core/Database/StatementPrefetch.php
+++ b/core/lib/Drupal/Core/Database/StatementPrefetch.php
@@ -425,7 +425,11 @@ class StatementPrefetch implements Iterator, StatementInterface {
     $this->fetchStyle = isset($fetch_style) ? $fetch_style : $this->defaultFetchStyle;
     $this->fetchOptions = $this->defaultFetchOptions;
     if (isset($fetch_column)) {
-      $this->fetchOptions['column'] = $fetch_column;
+      if ($fetch_style & PDO::FETCH_COLUMN) {
+          $this->fetchOptions['column'] = $fetch_column;
+      } else if ($fetch_style & PDO::FETCH_CLASS){
+          $this->fetchOptions['class'] = $fetch_column;
+      }
     }
     if (isset($constructor_args)) {
       $this->fetchOptions['constructor_args'] = $constructor_args;
