searchByName method
Implementation
searchByName(
selectQuery, GlobalSearchParameters params, LocalSqlDataStore sql) {
return selectQuery.where(buildAnd([
if (params.nameSearch != null)
buildOr([
sql.name.givenName.contains(
params.nameSearch!,
),
sql.name.familyName.contains(
params.nameSearch!,
),
buildOr([
sql.name.givenName.contains(
params.nameSearch!,
),
sql.name.familyName.contains(
params.nameSearch!,
),
sql.name.otherNames.equals(
params.nameSearch!,
),
]),
]),
]));
}