TableIndex.sql constructor
const
TableIndex.sql(
- String createIndexStatement
An annotation for Dart-defined drift tables telling drift to add an index
defined by a createIndexStatement
.
The index is still validated by drift_dev
at build time. Using a custom
SQL statement enables advanced index options, such as using custom
collations or indexing expressions. It can also be used for partials
indexes by adding a WHERE
clause.
Implementation
const TableIndex.sql(String this.createIndexStatement)
: name = '',
unique = false,
columns = const {};