searchByName method

dynamic searchByName(
  1. dynamic selectQuery,
  2. GlobalSearchParameters params,
  3. LocalSqlDataStore sql
)

Implementation

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