original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Add a row of data to be inserted .