Getting the compiled SQL out of queryExecute()

Unless I am missing something the ColdFusion function queryExecute() doesn't allow a "result" attribute to be defined so I needed another way to get the final SQL string.

local.qry = queryExecute(  
  "SELECT * FROM tablename WHERE name like :id",
  {
    name: {value: "%#name#%", cfSqlType: "cf_sql_varchar" }
  }
);
dump( local.qry.getSQL().toString() );  

N.B. I'm on Lucee doing this.