toSql method
Implementation
@override
String toSql() {
final buffer = StringBuffer('$name ${type.name} REFERENCES ${references.name} (${references.primaryKey.toSqlList()})');
if (onDelete != null) {
buffer.write(" ON DELETE ");
buffer.write(onDelete!.sql);
}
if (onUpdate != null) {
buffer.write(" ON UPDATE ");
buffer.write(onUpdate!.sql);
}
return buffer.toString();
}