code: public function compile(Database $db = NULL): string {
          if ($db === null) {
              // Get the database instance
              $db = \Mii::$app->db;
          }
  
          $value = $this->value();
  
          if (!empty($this->_parameters)) {
              // Quote all of the parameter values
              $params = array_map([$db, 'quote'], $this->_parameters);
  
              // Replace the values in the expression
              $value = strtr($value, $params);
          }
  
          return $value;
      }
docs: Compile the SQL expression and return it. Replaces any parameters with
  their given values.
  
  @param   mixed    Database instance or name of instance
  @return  string