toSQL<T extends SqlType> method

  1. @override
String toSQL<T extends SqlType>()
override

Generates the SQL field definition for this field.

Returns a complete MySQL field definition including data type, constraints, default values, and comments.

Example output: "field_name INT NOT NULL AUTO_INCREMENT PRIMARY KEY"

Implementation

@override
String toSQL<T extends SqlType>() {
  type = SqlType.isMysql<T>() ? FieldTypes.INT : FieldTypes.INTEGER;
  return super.toSQL<T>();
}