schemaIndex method
SchemaIndex?
schemaIndex(
- Sqlite column, {
- required SharedChecker<Model> checker,
})
Implementation
@visibleForOverriding
SchemaIndex? schemaIndex(Sqlite column, {required SharedChecker checker}) {
final isIterableAssociation = checker.isIterable && checker.isArgTypeASibling;
if (!column.ignore && column.index && !isIterableAssociation) {
final name = checker.isSibling
? InsertForeignKey.foreignKeyColumnName(
SharedChecker.withoutNullability(checker.unFuturedType),
column.name,
)
: column.name!;
return SchemaIndex(
columns: [name],
unique: column.unique,
);
}
return null;
}