Utility methods in the query builder APIs
The following methods on the DBFunction class provide useful functions in query builder code.
Method |
Description |
Example |
|---|---|---|
Constant |
Coerces a Gosu literal to an SQL literal in the generated SQL query that PolicyCenter submits to the database |
|
DateDiff |
Returns the Interval between two date and time columns |
|
DatePart |
Returns parts of a date and time column value, such as day or month |
|
DateFromTimestamp |
Returns the date portion of a timestamp |
|
| Distance | Returns the distance between the location of an entity instance and a reference location |
|
Expr |
Returns a function defined by a list of column references and character sequences |
See also
