code: public Cursor<T> openCursor(final Txn<T> txn) {
      if (SHOULD_CHECK) {
        requireNonNull(txn);
        txn.checkReady();
      }
      final PointerByReference cursorPtr = new PointerByReference();
      checkRc(LIB.mdb_cursor_open(txn.pointer(), ptr, cursorPtr));
      return new Cursor<>(cursorPtr.getValue(), txn);
    }
docs: Create a cursor handle.
  
  <p>
  A cursor is associated with a specific transaction and database. A cursor
  cannot be used when its database handle is closed. Nor when its transaction
  has ended, except with {@link Cursor#renew(org.lmdbjava.Txn)}. It can be
  discarded with {@link Cursor#close()}. A cursor in a write-transaction can
  be closed before its transaction ends, and will otherwise be closed when
  its transaction ends. A cursor in a read-only transaction must be closed
  explicitly, before or after its transaction ends. It can be reused with
  {@link Cursor#renew(org.lmdbjava.Txn)} before finally closing it.
  
  @param txn transaction handle (not null; not committed)
  @return cursor handle