Opens a BTreeFile and adds it to the catalog. @param cols number of columns in the table. @param f location of the file storing the table. @param keyField the field the B+ tree is keyed on @return the opened table.
(int cols, File f, int keyField)
| 421 | * @return the opened table. |
| 422 | */ |
| 423 | public static BTreeFile openBTreeFile(int cols, File f, int keyField) { |
| 424 | // create the BTreeFile and add it to the catalog |
| 425 | TupleDesc td = Utility.getTupleDesc(cols); |
| 426 | BTreeFile bf = new BTreeFile(f, keyField, td); |
| 427 | Database.getCatalog().addTable(bf, UUID.randomUUID().toString()); |
| 428 | return bf; |
| 429 | } |
| 430 | |
| 431 | public static BTreeFile openBTreeFile(int cols, String colPrefix, File f, int keyField) { |
| 432 | // create the BTreeFile and add it to the catalog |
no test coverage detected