Skip to content

@BindIndex

xcesco edited this page May 2, 2018 · 3 revisions

Annotation used to define table's indexes. It can be used in @BindTable annotation.

Attributes

  • value: an array of fields used for index definition. Every field can be followed by asc or desc keyword. Follow this link for more information.
  • unique: if true, it defines the index as a unique index: the index cannot have the same value for different rows.

Usage

@BindType
@BindTable(
  indexes= {
    @BindIndex({"birthCity", "birthDay desc"}),
    @BindIndex({"surname"}),
    @BindIndex(value={"name","surname", "date desc"}, unique=true )
  }
)
public class Person {
  ...
}

Table of Contents

Query definition

Features

Relations

Multithread supports

Modularization

Annotations for data convertion

Annotations for SQLite ORM

Annotations for shared preferences

Clone this wiki locally