class SqlViewUtils {

    public static Set<String> getVariables( String sql )
    {
        Set<String> variables = new HashSet<>();

        Matcher matcher = VARIABLE_PATTERN.matcher( sql );

        while ( matcher.find() )
        {
            variables.add( matcher.group( 1 ) );
        }

        return variables;
    }

}