columnDefinition property

  1. @override
String get columnDefinition
override

Get this field column definition for creation table.

For example:

firstName TEXT NOT NULL

serverId INT UNIQUE

Implementation

@override
String get columnDefinition {
  String result = super.columnDefinition;
  if (primaryKey == true) result += ' PRIMARY KEY';
  if (autoIncrement == true) result += ' AUTOINCREMENT';
  return result;
}