original_string: protected function _buildSetPart($parts, $query, $generator)
      {
          $set = [];
          foreach ($parts as $part) {
              if ($part instanceof ExpressionInterface) {
                  $part = $part->sql($generator);
              }
              if ($part[0] === '(') {
                  $part = substr($part, 1, -1);
              }
              $set[] = $part;
          }
  
          return ' SET ' . implode('', $set);
      }
code: protected function _buildSetPart($parts, $query, $generator)
      {
          $set = [];
          foreach ($parts as $part) {
              if ($part instanceof ExpressionInterface) {
                  $part = $part->sql($generator);
              }
              if ($part[0] === '(') {
                  $part = substr($part, 1, -1);
              }
              $set[] = $part;
          }
  
          return ' SET ' . implode('', $set);
      }
code_tokens: protected function _buildSetPart ( $ parts , $ query , $ generator ) { $ set = [ ] ; foreach ( $ parts as $ part ) { if ( $ part instanceof ExpressionInterface ) { $ part = $ part -> sql ( $ generator ) ; } if ( $ part [ 0 ] === '(' ) { $ part = substr ( $ part , 1 , - 1 ) ; } $ set [ ] = $ part ; } return ' SET ' . implode ( '' , $ set ) ; }
docstring: Helper function to generate SQL for SET expressions.
  
  @param array $parts List of keys & values to set.
  @param \Cake\Database\Query $query The query that is being compiled
  @param \Cake\Database\ValueBinder $generator the placeholder generator to be used in expressions
  @return string
docstring_tokens: Helper function to generate SQL for SET expressions .