queryExist method
Searches for what existing in the where column when exists.
Like all other query functions:
- When
whereis not specified, it's a global search in every column of the elements - When
specificNormalizationis specified, it is used instead of the global normalization settings. However, the global normalization settings are still used as fallback whenspecificNormalizationdoes not provide a setting.
Returns its research findings.
Implementation
Future<List<Result>> queryExist({
required String where,
required String what,
}) async {
return _anyQuery(where, (element, columnId, priority, refResults) {
// Gets the value from the currently "studied" column of the element.
final value = element[columnId];
// Does not exist or the value exists but it is null.
if (value == null || value[what] == null) {
return;
}
// The result is matching, adds it.
_addResultChecked(refDestination: refResults, element: element, priority: priority);
});
}