I tried working with the EL package's Query object to try building
something like this:

def evaluate(String query, Map coordinates) {
    def compiled = Query.compile(query)
    compiled.evaluate(coordinates)
}

Which for [ name: "John Smith" ] and query '${name}-${name:length()}' I
expected would return a string with both bracketed operations executed. It
threw an exception saying unexpected token '-' at column 7.

Am I missing something here?

Thanks,

Mike

Reply via email to