class MetaStatementMatcher {

    public ExtendedSqlStatement parse(final String fql) {
        if(fql.matches(DESC_STATEMENT_MATCH)) {
            final String[] parts = fql.split(DESC_STATEMENT_DELIMITER);
            if(parts.length != 2) {
                throw new FqlParsingException("Could not decode table name from desc statement. Table name format is: [a-zA-Z-_]+");
            }
            return new Describe(new Table(parts[1].toLowerCase()));
        }
        if(fql.matches(SHOWTABLES_STATEMENT_MATCH)) {
            return new ShowTables();
        }
        return null;
    }

}