public class Utility
extends java.lang.Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static HeapFile |
createEmptyHeapFile(java.lang.String path,
int cols)
A utility method to create a new HeapFile with a single empty page,
assuming the path does not already exist.
|
static Tuple |
getHeapTuple(int n) |
static Tuple |
getHeapTuple(int[] tupdata) |
static Tuple |
getHeapTuple(int n,
int width) |
static java.lang.String[] |
getStrings(int len,
java.lang.String val) |
static Tuple |
getTuple(int[] tupledata,
int width) |
static TupleDesc |
getTupleDesc(int n) |
static TupleDesc |
getTupleDesc(int n,
java.lang.String name) |
static Type[] |
getTypes(int len) |
static java.lang.String |
listToString(java.util.ArrayList<java.lang.Integer> list) |
static HeapFile |
openHeapFile(int cols,
java.io.File f)
Opens a HeapFile and adds it to the catalog.
|
static HeapFile |
openHeapFile(int cols,
java.lang.String colPrefix,
java.io.File f) |
public static Type[] getTypes(int len)
public static java.lang.String[] getStrings(int len, java.lang.String val)
public static TupleDesc getTupleDesc(int n, java.lang.String name)
public static TupleDesc getTupleDesc(int n)
public static Tuple getHeapTuple(int n)
public static Tuple getHeapTuple(int[] tupdata)
public static Tuple getHeapTuple(int n, int width)
public static Tuple getTuple(int[] tupledata, int width)
public static HeapFile createEmptyHeapFile(java.lang.String path, int cols) throws java.io.IOException
java.io.IOException
public static HeapFile openHeapFile(int cols, java.io.File f)
cols
- number of columns in the table.f
- location of the file storing the table.public static HeapFile openHeapFile(int cols, java.lang.String colPrefix, java.io.File f)
public static java.lang.String listToString(java.util.ArrayList<java.lang.Integer> list)