public function sql(&$parameters = array())
    {
        // Build each component as needed
        $sql = DB::build_sql($this, $parameters);

        if (empty($sql)) {
            return null;
        }

        if ($this->replacementsOld) {
            $sql = str_replace($this->replacementsOld, $this->replacementsNew, $sql);
        }

        return $sql;
    }