public final class SQLExpressions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Expression<java.lang.Object[]> |
all
Wildcard expression
|
static Expression<java.lang.Long> |
countAll
Wilcard count expression
|
Modifier and Type | Method and Description |
---|---|
static <D extends java.lang.Comparable> |
addDays(DateExpression<D> date,
int days)
Add the given amount of days to the date
|
static <D extends java.lang.Comparable> |
addDays(DateTimeExpression<D> date,
int days)
Add the given amount of days to the date
|
static <D extends java.lang.Comparable> |
addHours(DateTimeExpression<D> date,
int hours)
Add the given amount of hours to the date
|
static <D extends java.lang.Comparable> |
addMinutes(DateTimeExpression<D> date,
int minutes)
Add the given amount of minutes to the date
|
static <D extends java.lang.Comparable> |
addMonths(DateExpression<D> date,
int months)
Add the given amount of months to the date
|
static <D extends java.lang.Comparable> |
addMonths(DateTimeExpression<D> date,
int months)
Add the given amount of months to the date
|
static <D extends java.lang.Comparable> |
addSeconds(DateTimeExpression<D> date,
int seconds)
Add the given amount of seconds to the date
|
static <D extends java.lang.Comparable> |
addWeeks(DateExpression<D> date,
int weeks)
Add the given amount of weeks to the date
|
static <D extends java.lang.Comparable> |
addWeeks(DateTimeExpression<D> date,
int weeks)
Add the given amount of weeks to the date
|
static <D extends java.lang.Comparable> |
addYears(DateExpression<D> date,
int years)
Add the given amount of years to the date
|
static <D extends java.lang.Comparable> |
addYears(DateTimeExpression<D> date,
int years)
Add the given amount of years to the date
|
static BooleanExpression |
all(BooleanExpression expr)
Get an aggregate all expression for the given boolean expression
|
static BooleanExpression |
any(BooleanExpression expr)
Get an aggregate any expression for the given boolean expression
|
static <T extends java.lang.Number> |
avg(Expression<T> expr) |
static WindowOver<java.lang.Long> |
count(Expression<?> expr) |
static <D extends java.lang.Comparable> |
date(java.lang.Class<D> type,
DateTimeExpression<?> dateTime)
Convert timestamp to date
|
static <D extends java.lang.Comparable> |
date(DateTimeExpression<D> dateTime)
Convert timestamp to date
|
static <D extends java.lang.Comparable> |
dateadd(DatePart unit,
DateExpression<D> date,
int amount)
Get a dateadd(unit, date, amount) expression
|
static <D extends java.lang.Comparable> |
dateadd(DatePart unit,
DateTimeExpression<D> date,
int amount)
Get a dateadd(unit, date, amount) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
DateExpression<D> start,
D end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
DateExpression<D> start,
DateExpression<D> end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
DateTimeExpression<D> start,
D end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
DateTimeExpression<D> start,
DateTimeExpression<D> end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
D start,
DateExpression<D> end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datediff(DatePart unit,
D start,
DateTimeExpression<D> end)
Get a datediff(unit, start, end) expression
|
static <D extends java.lang.Comparable> |
datetrunc(DatePart unit,
DateExpression<D> expr)
Truncate the given date expression
|
static <D extends java.lang.Comparable> |
datetrunc(DatePart unit,
DateTimeExpression<D> expr)
Truncate the given datetime expression
|
static WindowOver<java.lang.Long> |
denseRank()
rank of the current row without gaps; this function counts peer groups
|
static <T> WindowOver<T> |
firstValue(Expression<T> expr)
returns value evaluated at the row that is the first row of the window frame
|
static <T> WindowOver<T> |
lag(Expression<T> expr)
expr evaluated at the row that is one row before the current row within the partition
|
static <T> WindowOver<T> |
lastValue(Expression<T> expr)
returns value evaluated at the row that is the last row of the window frame
|
static <T> WindowOver<T> |
lead(Expression<T> expr)
expr evaluated at the row that is one row after the current row within the partition;
|
static <T extends java.lang.Comparable> |
max(Expression<T> expr) |
static <T extends java.lang.Comparable> |
min(Expression<T> expr) |
static <T extends java.lang.Number> |
nextval(java.lang.Class<T> type,
java.lang.String sequence)
Get a nextval(sequence) expression of the given type
|
static SimpleExpression<java.lang.Long> |
nextval(java.lang.String sequence)
Get a nextval(sequence) expression
|
static WindowOver<java.lang.Long> |
rank()
rank of the current row with gaps; same as row_number of its first peer
|
static WindowOver<java.lang.Long> |
rowNumber()
number of the current row within its partition, counting from 1
|
static <T extends java.lang.Number> |
sum(Expression<T> expr) |
public static final Expression<java.lang.Object[]> all
public static final Expression<java.lang.Long> countAll
public static BooleanExpression any(BooleanExpression expr)
public static BooleanExpression all(BooleanExpression expr)
public static final SimpleExpression<java.lang.Long> nextval(java.lang.String sequence)
sequence
- public static final <T extends java.lang.Number> SimpleExpression<T> nextval(java.lang.Class<T> type, java.lang.String sequence)
type
- sequence
- public static <D extends java.lang.Comparable> DateExpression<D> date(DateTimeExpression<D> dateTime)
dateTime
- public static <D extends java.lang.Comparable> DateExpression<D> date(java.lang.Class<D> type, DateTimeExpression<?> dateTime)
type
- dateTime
- public static <D extends java.lang.Comparable> DateTimeExpression<D> dateadd(DatePart unit, DateTimeExpression<D> date, int amount)
unit
- date
- amount
- public static <D extends java.lang.Comparable> DateExpression<D> dateadd(DatePart unit, DateExpression<D> date, int amount)
unit
- date
- amount
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, DateExpression<D> start, DateExpression<D> end)
unit
- start
- end
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, D start, DateExpression<D> end)
unit
- start
- end
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, DateExpression<D> start, D end)
unit
- start
- end
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, DateTimeExpression<D> start, DateTimeExpression<D> end)
unit
- start
- end
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, D start, DateTimeExpression<D> end)
unit
- start
- end
- public static <D extends java.lang.Comparable> NumberExpression<java.lang.Integer> datediff(DatePart unit, DateTimeExpression<D> start, D end)
unit
- start
- end
- public static <D extends java.lang.Comparable> DateExpression<D> datetrunc(DatePart unit, DateExpression<D> expr)
unit
- expr
- public static <D extends java.lang.Comparable> DateTimeExpression<D> datetrunc(DatePart unit, DateTimeExpression<D> expr)
unit
- expr
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addYears(DateTimeExpression<D> date, int years)
date
- years
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addMonths(DateTimeExpression<D> date, int months)
date
- months
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addWeeks(DateTimeExpression<D> date, int weeks)
date
- weeks
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addDays(DateTimeExpression<D> date, int days)
date
- days
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addHours(DateTimeExpression<D> date, int hours)
date
- hours
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addMinutes(DateTimeExpression<D> date, int minutes)
date
- minutes
- public static <D extends java.lang.Comparable> DateTimeExpression<D> addSeconds(DateTimeExpression<D> date, int seconds)
date
- seconds
- public static <D extends java.lang.Comparable> DateExpression<D> addYears(DateExpression<D> date, int years)
date
- years
- public static <D extends java.lang.Comparable> DateExpression<D> addMonths(DateExpression<D> date, int months)
date
- months
- public static <D extends java.lang.Comparable> DateExpression<D> addWeeks(DateExpression<D> date, int weeks)
date
- weeks
- public static <D extends java.lang.Comparable> DateExpression<D> addDays(DateExpression<D> date, int days)
date
- days
- public static <T extends java.lang.Number> WindowOver<T> sum(Expression<T> expr)
expr
- public static WindowOver<java.lang.Long> count(Expression<?> expr)
expr
- public static <T extends java.lang.Number> WindowOver<T> avg(Expression<T> expr)
expr
- public static <T extends java.lang.Comparable> WindowOver<T> min(Expression<T> expr)
expr
- public static <T extends java.lang.Comparable> WindowOver<T> max(Expression<T> expr)
expr
- public static <T> WindowOver<T> lead(Expression<T> expr)
expr
- public static <T> WindowOver<T> lag(Expression<T> expr)
expr
- public static WindowOver<java.lang.Long> rank()
public static WindowOver<java.lang.Long> denseRank()
public static WindowOver<java.lang.Long> rowNumber()
public static <T> WindowOver<T> firstValue(Expression<T> expr)
expr
- public static <T> WindowOver<T> lastValue(Expression<T> expr)
expr
- Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.