模块 org.redkale

注释类型 Index


  • @Documented
    @Target(TYPE)
    @Retention(RUNTIME)
    public @interface Index
    Used in schema generation to specify creation of an index.

    Note that it is not necessary to specify an index for a primary key, as the primary key index will be created automatically.

    The syntax of the columnList element is a column_list, as follows:

        column::= index_column [,index_column]*
        index_column::= column_name [ASC | DESC]
     

    If ASC or DESC is not specified, ASC (ascending order) is assumed.

    从以下版本开始:
    Java Persistence 2.1
    • 必需元素概要

      所需元素 
      修饰符和类型 必需的元素 说明
      String[] columns
      (Required) The names of the columns to be included in the index, in order.
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      String name
      (Optional) The name of the index; defaults to a provider-generated name.
      boolean unique
      (Optional) Whether the index is unique.
    • 元素详细资料

      • columns

        String[] columns
        (Required) The names of the columns to be included in the index, in order.
        返回:
        String[]
      • name

        String name
        (Optional) The name of the index; defaults to a provider-generated name.
        返回:
        String
        默认值:
        ""
      • unique

        boolean unique
        (Optional) Whether the index is unique.
        返回:
        boolean
        默认值:
        false