public function add($data)
    {
        if ((count($this->_values) && $data instanceof Query) ||
            ($this->_query && is_array($data))
        ) {
            throw new Exception(
                'You cannot mix subqueries and array data in inserts.'
            );
        }
        if ($data instanceof Query) {
            $this->setQuery($data);

            return;
        }
        $this->_values[] = $data;
        $this->_castedExpressions = false;
    }
public function add($data)
    {
        if ((count($this->_values) && $data instanceof Query) ||
            ($this->_query && is_array($data))
        ) {
            throw new Exception(
                'You cannot mix subqueries and array data in inserts.'
            );
        }
        if ($data instanceof Query) {
            $this->setQuery($data);

            return;
        }
        $this->_values[] = $data;
        $this->_castedExpressions = false;
    }
public function add ( $ data ) { if ( ( count ( $ this -> _values ) && $ data instanceof Query ) || ( $ this -> _query && is_array ( $ data ) ) ) { throw new Exception ( 'You cannot mix subqueries and array data in inserts.' ) ; } if ( $ data instanceof Query ) { $ this -> setQuery ( $ data ) ; return ; } $ this -> _values [ ] = $ data ; $ this -> _castedExpressions = false ; }
Add a row of data to be inserted.

@param array|\Cake\Database\Query $data Array of data to append into the insert, or
a query for doing INSERT INTO .. SELECT style commands
@return void
@throws \Cake\Database\Exception When mixing array + Query data types.
Add a row of data to be inserted .