original_string: public function sql(ValueBinder $generator)
      {
          $parts = [];
          $parts[] = 'CASE';
          foreach ($this->_conditions as $k => $part) {
              $value = $this->_values[$k];
              $parts[] = 'WHEN ' . $this->_compile($part, $generator) . ' THEN ' . $this->_compile($value, $generator);
          }
          if ($this->_elseValue !== null) {
              $parts[] = 'ELSE';
              $parts[] = $this->_compile($this->_elseValue, $generator);
          }
          $parts[] = 'END';
  
          return implode(' ', $parts);
      }
code: public function sql(ValueBinder $generator)
      {
          $parts = [];
          $parts[] = 'CASE';
          foreach ($this->_conditions as $k => $part) {
              $value = $this->_values[$k];
              $parts[] = 'WHEN ' . $this->_compile($part, $generator) . ' THEN ' . $this->_compile($value, $generator);
          }
          if ($this->_elseValue !== null) {
              $parts[] = 'ELSE';
              $parts[] = $this->_compile($this->_elseValue, $generator);
          }
          $parts[] = 'END';
  
          return implode(' ', $parts);
      }
code_tokens: public function sql ( ValueBinder $ generator ) { $ parts = [ ] ; $ parts [ ] = 'CASE' ; foreach ( $ this -> _conditions as $ k => $ part ) { $ value = $ this -> _values [ $ k ] ; $ parts [ ] = 'WHEN ' . $ this -> _compile ( $ part , $ generator ) . ' THEN ' . $ this -> _compile ( $ value , $ generator ) ; } if ( $ this -> _elseValue !== null ) { $ parts [ ] = 'ELSE' ; $ parts [ ] = $ this -> _compile ( $ this -> _elseValue , $ generator ) ; } $ parts [ ] = 'END' ; return implode ( ' ' , $ parts ) ; }
docstring: Converts the Node into a SQL string fragment.
  
  @param \Cake\Database\ValueBinder $generator Placeholder generator object
  
  @return string
docstring_tokens: Converts the Node into a SQL string fragment .