public function sql(ValueBinder $generator = null)
    {
        if (!$generator) {
            $generator = $this->getValueBinder();
            $generator->resetCount();
        }

        return $this->getConnection()->compileQuery($this, $generator);
    }