org.apache.ignite.cache.query.annotations

## Annotation Type QuerySqlField.Group

-     @Retention(value=RUNTIME)
       @Target(value={METHOD,FIELD})
      public static @interface QuerySqlField.Group

  Describes group of index and position of field in this 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.

  See Also:
    `QuerySqlField.groups()`, `QuerySqlField.orderedGroups()`

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `name` Group index name where this field participate.
    `int` | `order` Fields in this group index will be sorted on this attribute.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `descending` Defines sorting order for this field in group.

- - ### Element Detail

    - #### name

          public abstract String name

      Group index name where this field participate.
      Returns:
        Group index name

  - - #### order

          public abstract int order

      Fields in this group index will be sorted on this attribute.
      Returns:
        Order number.

  - - #### descending

          public abstract boolean descending

      Defines sorting order for this field in group.
      Returns:
        True if field will be in descending order.
      Default:
        false

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022