IndexDef class

Definition of an index attached to a table.

Constructors

IndexDef(String name, String column, {bool unique = false, String? whereSql, String? exprSql, List<String>? columns, List<String>? collations})

Properties

collations List<String>
Per-column collation names ('BINARY' is the default). Currently honored: 'NOCASE' (case-insensitive string comparison). Length matches columns.
final
column String
final
columns List<String>
Full ordered list of indexed columns. For single-column indexes this is [column]; multi-column indexes carry every key column. The in-memory engine still treats only column as the lookup key, but the extra columns are preserved so they can be round-tripped through the SQLite file format.
final
exprSql String?
Optional indexed-expression source (SQL text). When non-null the index is on this expression rather than a base column.
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unique bool
final
whereSql String?
Optional WHERE predicate (SQL text) for partial indexes.
final

Methods

collate(int pos, Object? value) Object?
Apply this index's collation rules to a key value at column position pos. Currently only 'NOCASE' transforms strings (lowercased).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited