private static function parseTableName($name)
    {
        // Init buffer
        $buffer = '';
        $strOpen = false;
        $names = array();

        $strLen = strlen($name);
        for($i = 0; $i < $strLen; $i++)
        {
            if($name[$i] == '"')
            {
                // Toggle strings
                if( !$strOpen || ($strOpen && $name[$i - 1] != "\\") )
                {
                    $strOpen = !$strOpen;
                }
            }
            elseif($name[$i] == '.' && !$strOpen)
            {
                // Save and cleanup buffer. Continue.
                $names[] = $buffer;
                $buffer = '';
                continue;
            }

            // Store char
            $buffer .= $name[$i];
        }

        // Save last buffer
        if($buffer != '') {
            $names[] = $buffer;
        }

        return $names;
    }