package simpledb.test;

import simpledb.*;
import java.util.*;

/**
 * Dumps the contents of a table.
 * args[1] is the number of columns.  E.g., if it's 5, then ScanTest will end
 * up dumping the contents of f4.txt.
 */
public class ScanTest extends Test {
  public boolean runTest(String args[]) {
    try {
      dump(file[Integer.parseInt(args[1])-1][Integer.parseInt(args[2])]);
    } catch (TransactionAbortedException te) {
      te.printStackTrace();
      return false;
    } catch (java.io.IOException e) {
	e.printStackTrace();
	return false;
    }
    return true;
  }
}
