How do you invoke database functions from grails?
Such as the CONVERT(decimal, timestamp)
Without using groovy SQL like this:
def sql = new Sql(dataSource)
I would like to avoid any SQL statements and take full advantage of the grails magic.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
My understanding is that grails does not have native support for database functions. You will need to write SQL. Gorm is an abstraction of Hibernate, you may want to refer to:
How can you call custom database functions with Hibernate?