Skip to content
gerritjvv edited this page May 2, 2012 · 3 revisions

Overview

These are functions that can be used in the sql statement. The class org.simplesql.funct.SQLFunctions implement these as static methods.

Functions

Definition Description Example
COUNT(col):long natively part of the SQL Compiler COUNT(col)
SUM(col):long natively part of the SQL Compiler SUM(col)
SIZE(arg:String):int Character length of a String, 0 if null SIZE('HI')
DATE_FORMAT(format:String, millis:Long):String Format milliseconds to a String representation using the JodaTime formats DATE_FORMAT('yyyy-MM-dd', date)
DATE_TO_MILLIS(format:String, dateStr:String):long Format a String date to milliseconds using the JodaTime formats DATE_TO_MILLIS('yyyy-MM-dd', '2011-12-01')

Clone this wiki locally