@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD})
public static @interface QuerySqlField.Group
Opposite to QuerySqlField.groups() this annotation gives control over order of fields in a group index.
This can be needed in scenarios when we have a query like
select * from X where a = ? and b = ? order by b desc. If we have index (a asc, b asc)
sorting on b will be performed. Here it is preferable to have index (b desc, a asc)
which will still allow query to search on index using both fields and avoid sorting because index
is already sorted in needed way.
| 修飾子とタイプ | 必須要素と説明 |
|---|---|
java.lang.String |
name
Group index name where this field participate.
|
int |
order
Fields in this group index will be sorted on this attribute.
|
| 修飾子とタイプ | 任意要素と説明 |
|---|---|
boolean |
descending
Defines sorting order for this field in group.
|
Copyright (C) 2017 NEC Corporation. All rights reserved.