mappingNameHasDuplicate method
- AnkiMapping mapping
Check if a mapping with a certain name with a different order already exists.
Implementation
bool mappingNameHasDuplicate(AnkiMapping mapping) {
return _database.ankiMappings
.where()
.labelEqualTo(mapping.label)
.filter()
.not()
.orderEqualTo(mapping.order)
.findFirstSync() !=
null;
}