I am trying to execute a query like the following, using HQL, that uses a native SQL function (dbms_lob.getlength):
dbms_lob.getlength
def results = Attachment.execute
You can always use basic java jdbc connection in order to execute query. Create the java code for this and store it in src/java/.