findLocation method

Future<TupleLocation?> findLocation(
  1. int rowId
)

Implementation

Future<TupleLocation?> findLocation(int rowId) async {
  for (final pid in await _allPageIds()) {
    final page = await _getPage(pid);
    for (final t in page.scanTuples()) {
      if (TupleCodec.peekRowId(t.data) == rowId) {
        return TupleLocation(pid, t.slotIdx);
      }
    }
  }
  return null;
}