addIndex method

Future<void> addIndex(
  1. String tableName,
  2. String indexName,
  3. List<String> columns, {
  4. ColumnIndex type = ColumnIndex.indexKey,
})

Implementation

Future<void> addIndex(
  String tableName,
  String indexName,
  List<String> columns, {
  ColumnIndex type = ColumnIndex.indexKey,
}) async {
  final index = IndexBlueprint(name: indexName, columns: columns, type: type);
  final statements = _requireAdapter.renderAddIndex(tableName, index);
  await _executeStatements(statements);
}