MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / openBTreeFile

Method openBTreeFile

src/java/simpledb/index/BTreeUtility.java:423–429  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

convertMethod · 0.95
createEmptyBTreeFileMethod · 0.95

Calls 4

getTupleDescMethod · 0.95
getCatalogMethod · 0.95
toStringMethod · 0.65
addTableMethod · 0.45

Tested by

no test coverage detected