Converts the index snapshot to a map.
Map<String, dynamic> toMap() { return { 'name': name, 'tableName': tableName, 'columns': columns, 'isUnique': isUnique, if (where != null) 'where': where, }; }