hasIndex method

bool hasIndex(
  1. String columnName
)

Returns true if the given column has an index.

Implementation

bool hasIndex(String columnName) {
  // Check both the in-catalog index map and the schema
  if (indexes.containsKey(columnName)) return true;
  final col = schema.findColumn(columnName);
  return col != null && (col.isIndexed || col.isPrimaryKey);
}