PrimaryKeyDaoField class

Annotation for primary key dao fields.

Valid types are int and String. A DAO class can only have one primary key field.

If name is not set, the name of the class is used.

The length parameter defines the size of the String or int field. If used on a string field, the length is interpreted as amount of characters. If used on an int or double field, the length is interpreted as amount of bits used to represent the value.

Be aware that different DatabaseAdapter implementations can accept different types lengths and may throw if an invalid size is used.

If length is not set, the default of the given type is used: String: 255 int: 32 double: 64

autoIncrement only works for int fields and is enabled by default.

Inheritance

Constructors

PrimaryKeyDaoField({String? name, int? length, bool autoIncrement = true})
const

Properties

autoIncrement bool
final
hashCode int
The hash code for this object.
no setterinherited
length int?
finalinherited
name String?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited