public function import($filename)
    {
        // TODO: Wrap this in a transaction!
        if (!file_exists($filename)) {
            throw new Exception("File not found: $filename");
        }

        $sql_queries = file_get_contents($filename);
        $sql_queries = $this->_removeRemarks($sql_queries);
        $sql_queries = StringUtils::smartSplit($sql_queries, ";", "'", "\\'");

        foreach ($sql_queries as $sql) {
            $sql = trim($sql); // Trim newlines so we don't have blank queries
            if (empty($sql))
                continue;
            $this->write($sql);
        }
    }