toQuery method

IsarQuery toQuery(
  1. Isar isar
)

Implementation

IsarQuery<dynamic> toQuery(Isar isar) {
  final colIndex = isar.schemas.indexWhere((e) => e.name == this.collection);
  final collection = isar.collectionByIndex<dynamic, dynamic>(colIndex);
  return collection.buildQuery(
    filter: filter,
    sortBy: [
      if (sortProperty != null)
        SortProperty(
          property: sortProperty!,
          sort: sortAsc ? Sort.asc : Sort.desc,
        ),
    ],
  );
}