Пример #1
0
 /**
  * Adds the specified tuple to the page.
  *
  * @throws DbException if the page is full (no empty slots) or tupledesc is mismatch.
  * @param t The tuple to add.
  */
 public void addTuple(Tuple t) throws DbException {
   int index = header.findFirstEmptySlot();
   if (index == -1) {
     throw new DbException("No empty slot for new tuple");
   } else {
     header.setSlotVal(index, true);
     tuples[index] = t;
   }
 }