@Retention(value=RUNTIME)
@Target(value=FIELD)
@Inherited
public @interface PRIMARY_KEY
TypeAffinities.INTEGER
as affinity in KITTY_COLUMN.columnAffinity() without autoincrement()
flag and without AscDesc.DESCENDING as value for orderAscDesc(), cause:
KITTY_COLUMN set KITTY_COLUMN.isIPK() to true and KITTY_COLUMN.columnAffinity() to
TypeAffinities.INTEGER or
KITTY_COLUMN @link KITTY_COLUMN#columnAffinity()} to TypeAffinities.INTEGER and
annotate model's field with PRIMARY_KEY without setting autoincrement() and
orderAscDesc() to value AscDesc.DESCENDING. Also do not forget to annotate field with
NOT_NULL (SQLite supports NULL values for IPK but they not supported by KittyORM).
Created by akaish on 30.04.2018.| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
autoincrement
AUTOINCREMENT keyword flag, if false than it would be skipped at column PK constraint generation
Default value is false |
ConflictClauses |
onConflictAction
Action that should be performed on conflict, if default value set than it would be skipped at column PK constraint generation
Default value is ConflictClauses.CONFLICT_CLAUSE_NOT_SET |
AscDesc |
orderAscDesc
Order (ASC\DESC), if default value set than it would be skipped at column PK constraint generation
Default value is AscDesc.NOT_SET_SKIP_OR_DEFAULT |
public abstract AscDesc orderAscDesc
AscDesc.NOT_SET_SKIP_OR_DEFAULTpublic abstract boolean autoincrement
public abstract ConflictClauses onConflictAction
ConflictClauses.CONFLICT_CLAUSE_NOT_SET