code: public function createQuery($designDocName, $viewName)
      {
          $designDoc = $this->config->getDesignDocument($designDocName);
          if ($designDoc) {
              $designDoc = new $designDoc['className']($designDoc['options']);
          }
          $query = new ODMQuery($this->couchDBClient->getHttpClient(), $this->couchDBClient->getDatabase(), $designDocName, $viewName, $designDoc);
          $query->setDocumentManager($this);
          return $query;
      }
docs: Create a Query for the view in the specified design document.
  
  @param  string $designDocName
  @param  string $viewName
  @return \Doctrine\ODM\CouchDB\View\ODMQuery