src/Titon/Db/Repository.php
public function save(Query $query, array $options = []) {
        $type = $query->getType();

        if ($type === Query::DELETE) {
            return $this->_processDelete($query, $options);

        } else if ($type === Query::INSERT) {
            return $this->_processCreate($query, $options);

        } else if ($type === Query::UPDATE) {
            return $this->_processUpdate($query, $options);
        }

        // No processing or events, just execute it directly
        return $this->getDriver()->executeQuery($query)->save();
    }
public function save(Query $query, array $options = []) {
        $type = $query->getType();

        if ($type === Query::DELETE) {
            return $this->_processDelete($query, $options);

        } else if ($type === Query::INSERT) {
            return $this->_processCreate($query, $options);

        } else if ($type === Query::UPDATE) {
            return $this->_processUpdate($query, $options);
        }

        // No processing or events, just execute it directly
        return $this->getDriver()->executeQuery($query)->save();
    }
public function save ( Query $ query , array $ options = [ ] ) { $ type = $ query -> getType ( ) ; if ( $ type === Query :: DELETE ) { return $ this -> _processDelete ( $ query , $ options ) ; } else if ( $ type === Query :: INSERT ) { return $ this -> _processCreate ( $ query , $ options ) ; } else if ( $ type === Query :: UPDATE ) { return $ this -> _processUpdate ( $ query , $ options ) ; } // No processing or events, just execute it directly return $ this -> getDriver ( ) -> executeQuery ( $ query ) -> save ( ) ; }
Return a count of how many rows were affected by the query.

@param \Titon\Db\Query $query
@param array $options
@return int
Return a count of how many rows were affected by the query .