def test_key_reflection(self):
    regex = self.parser._re_key
    assert regex.match('  PRIMARY KEY (`id`),')
    assert regex.match('  PRIMARY KEY USING BTREE (`id`),')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE,')
    assert regex.match('  PRIMARY KEY (`id`)')
    assert regex.match('  PRIMARY KEY USING BTREE (`id`)')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE 16')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE=16')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE  = 16')
    assert (not regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE = = 16'))
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'comment'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT '''comment'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'comment'''")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'prefix''suffix'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'prefix''text''suffix'")
    assert regex.match('  FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ ')
def test_key_reflection(self):
    regex = self.parser._re_key
    assert regex.match('  PRIMARY KEY (`id`),')
    assert regex.match('  PRIMARY KEY USING BTREE (`id`),')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE,')
    assert regex.match('  PRIMARY KEY (`id`)')
    assert regex.match('  PRIMARY KEY USING BTREE (`id`)')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE 16')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE=16')
    assert regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE  = 16')
    assert (not regex.match('  PRIMARY KEY (`id`) USING BTREE KEY_BLOCK_SIZE = = 16'))
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'comment'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'comment'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'comment'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'prefixsuffix'")
    assert regex.match("  KEY (`id`) USING BTREE COMMENT 'prefixtextsuffix'")
    assert regex.match('  FULLTEXT KEY `ix_fulltext_oi_g_name` (`oi_g_name`) /*!50100 WITH PARSER `ngram` */ ')