findIds method

List<int> findIds (
  1. {int offset: 0,
  2. int limit: 0}
)

Finds Objects matching the query and returns their IDs.

offset and limit are deprecated, explicitly call the equally named methods.

Implementation

List<int> findIds({int offset = 0, int limit = 0}) {
  if (offset > 0) {
    this.offset(offset);
  }
  if (limit > 0) {
    this.limit(limit);
  }
  final idArrayPtr =
      checkObxPtr(bindings.obx_query_find_ids(_cQuery), 'find ids');
  try {
    final idArray = idArrayPtr.ref;
    return idArray.length == 0 ? <int>[] : idArray.items();
  } finally {
    bindings.obx_id_array_free(idArrayPtr);
  }
}