original_string: public function compile(Query $query, ValueBinder $generator)
      {
          $sql = '';
          $type = $query->type();
          $query->traverse(
              $this->_sqlCompiler($sql, $query, $generator),
              $this->{'_' . $type . 'Parts'}
          );
  
          // Propagate bound parameters from sub-queries if the
          // placeholders can be found in the SQL statement.
          if ($query->getValueBinder() !== $generator) {
              foreach ($query->getValueBinder()->bindings() as $binding) {
                  $placeholder = ':' . $binding['placeholder'];
                  if (preg_match('/' . $placeholder . '(?:\W|$)/', $sql) > 0) {
                      $generator->bind($placeholder, $binding['value'], $binding['type']);
                  }
              }
          }
  
          return $sql;
      }
code: public function compile(Query $query, ValueBinder $generator)
      {
          $sql = '';
          $type = $query->type();
          $query->traverse(
              $this->_sqlCompiler($sql, $query, $generator),
              $this->{'_' . $type . 'Parts'}
          );
  
          // Propagate bound parameters from sub-queries if the
          // placeholders can be found in the SQL statement.
          if ($query->getValueBinder() !== $generator) {
              foreach ($query->getValueBinder()->bindings() as $binding) {
                  $placeholder = ':' . $binding['placeholder'];
                  if (preg_match('/' . $placeholder . '(?:\W|$)/', $sql) > 0) {
                      $generator->bind($placeholder, $binding['value'], $binding['type']);
                  }
              }
          }
  
          return $sql;
      }
code_tokens: public function compile ( Query $ query , ValueBinder $ generator ) { $ sql = '' ; $ type = $ query -> type ( ) ; $ query -> traverse ( $ this -> _sqlCompiler ( $ sql , $ query , $ generator ) , $ this -> { '_' . $ type . 'Parts' } ) ; // Propagate bound parameters from sub-queries if the // placeholders can be found in the SQL statement. if ( $ query -> getValueBinder ( ) !== $ generator ) { foreach ( $ query -> getValueBinder ( ) -> bindings ( ) as $ binding ) { $ placeholder = ':' . $ binding [ 'placeholder' ] ; if ( preg_match ( '/' . $ placeholder . '(?:\W|$)/' , $ sql ) > 0 ) { $ generator -> bind ( $ placeholder , $ binding [ 'value' ] , $ binding [ 'type' ] ) ; } } } return $ sql ; }
docstring: Returns the SQL representation of the provided query after generating
  the placeholders for the bound values using the provided generator
  
  @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 \Closure
docstring_tokens: Returns the SQL representation of the provided query after generating the placeholders for the bound values using the provided generator