public function mode($mode)
    {
        if (!isset($this->templates[$mode])) {
            throw new Exception(['Structure builder does not have this mode', 'mode' => $mode]);
        }

        $this->mode = $mode;
        $this->template = $this->templates[$mode];

        return $this;
    }
public function mode($mode)
    {
        if (!isset($this->templates[$mode])) {
            throw new Exception(['Structure builder does not have this mode', 'mode' => $mode]);
        }

        $this->mode = $mode;
        $this->template = $this->templates[$mode];

        return $this;
    }
public function mode ( $ mode ) { if ( ! isset ( $ this -> templates [ $ mode ] ) ) { throw new Exception ( [ 'Structure builder does not have this mode' , 'mode' => $ mode ] ) ; } $ this -> mode = $ mode ; $ this -> template = $ this -> templates [ $ mode ] ; return $ this ; }
Set SQL expression template.

@param string $mode Template name

@return $this
Set SQL expression template .