public function execute() {
        if (!$this->checkExists()) {
            if ($this->current === self::OP_SELECT) {
                return new ArrayCollection();
            }

            return false;
        }
        $this->createQuery();

        $model = ($this->expected) ? $this->getRowModel() : null;
        if ($this->current === self::OP_SELECT && $this->isCached()) {
            $result = $this->getCached();
        }
        if (!$result) {
            if ($this->preserveQueries && $this->current !== self::OP_SELECT) // keep all queries except selects
                    $this->doPreserveQueries();
            $result = $this->connection->doPrepare($this->query, $this->values,
                    array(
                'multipleRows' => $this->multiple,
                'model' => $model
            ));

            if ($this->current === self::OP_SELECT) $this->saveCache($result);
            else $this->removeCache();
        }

        if ($this->current === self::OP_SELECT)
                $result = $this->returnSelect($result);
        $this->lastQuery = $this->query . '<pre><code>' . print_r($this->values,
                        true) . '</code></pre>';
        $this->resetQuery();
        return $result;
    }
public function execute() {
        if (!$this->checkExists()) {
            if ($this->current === self::OP_SELECT) {
                return new ArrayCollection();
            }

            return false;
        }
        $this->createQuery();

        $model = ($this->expected) ? $this->getRowModel() : null;
        if ($this->current === self::OP_SELECT && $this->isCached()) {
            $result = $this->getCached();
        }
        if (!$result) {
            if ($this->preserveQueries && $this->current !== self::OP_SELECT) // keep all queries except selects
                    $this->doPreserveQueries();
            $result = $this->connection->doPrepare($this->query, $this->values,
                    array(
                'multipleRows' => $this->multiple,
                'model' => $model
            ));

            if ($this->current === self::OP_SELECT) $this->saveCache($result);
            else $this->removeCache();
        }

        if ($this->current === self::OP_SELECT)
                $result = $this->returnSelect($result);
        $this->lastQuery = $this->query . '<pre><code>' . print_r($this->values,
                        true) . '</code></pre>';
        $this->resetQuery();
        return $result;
    }
public function execute ( ) { if ( ! $ this -> checkExists ( ) ) { if ( $ this -> current === self :: OP_SELECT ) { return new ArrayCollection ( ) ; } return false ; } $ this -> createQuery ( ) ; $ model = ( $ this -> expected ) ? $ this -> getRowModel ( ) : null ; if ( $ this -> current === self :: OP_SELECT && $ this -> isCached ( ) ) { $ result = $ this -> getCached ( ) ; } if ( ! $ result ) { if ( $ this -> preserveQueries && $ this -> current !== self :: OP_SELECT ) // keep all queries except selects $ this -> doPreserveQueries ( ) ; $ result = $ this -> connection -> doPrepare ( $ this -> query , $ this -> values , array ( 'multipleRows' => $ this -> multiple , 'model' => $ model ) ) ; if ( $ this -> current === self :: OP_SELECT ) $ this -> saveCache ( $ result ) ; else $ this -> removeCache ( ) ; } if ( $ this -> current === self :: OP_SELECT ) $ result = $ this -> returnSelect ( $ result ) ; $ this -> lastQuery = $ this -> query . '<pre><code>' . print_r ( $ this -> values , true ) . '</code></pre>' ; $ this -> resetQuery ( ) ; return $ result ; }
Executes the delayed database operation
@return mixed
Executes the delayed database operation