schemaIndex method

  1. @visibleForOverriding
SchemaIndex? schemaIndex(
  1. Sqlite column, {
  2. 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;
}