示例#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;
   }
 }
示例#2
0
 /** Abstraction to fill a slot on this page. */
 public void setSlot(int i, boolean value) {
   header.setSlotVal(i, value);
 }