public function endElement($name)
    {
        if (self::DEBUG) {
            print("endElement(" . $name . ") called\n");
        }
        if ($name == "dataset") {
            if ($this->currBuilder !== null) {
                $this->sqlWriter->write($this->currBuilder->getTableEndSql());
            }
            $this->sqlWriter->write(call_user_func(array($this->builderClazz, 'getDatabaseEndSql')));
        }
    }