Package edu.caltech.nanodb.relations
Class TableInfo
- java.lang.Object
-
- edu.caltech.nanodb.relations.TableInfo
-
public class TableInfo extends java.lang.Object
This class represents a single table in the database, including the table's name, and the tuple file that holds the table's data.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
tableName
The name of this table.private TupleFile
tupleFile
The tuple file that holds the table's data.static java.lang.String
UNNAMED_TABLE
If a table name isn't specified, this value is used instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBFile
getDBFile()
A helper function to simplify retrieving the table'sDBFile
.Schema
getSchema()
A helper function to simplify retrieving the table's schema.TableStats
getStats()
java.lang.String
getTableName()
Returns the associated table name.TupleFile
getTupleFile()
Returns the tuple file that holds the table's data.
-
-
-
Field Detail
-
UNNAMED_TABLE
public static final java.lang.String UNNAMED_TABLE
If a table name isn't specified, this value is used instead.- See Also:
- Constant Field Values
-
tableName
private java.lang.String tableName
The name of this table.
-
tupleFile
private TupleFile tupleFile
The tuple file that holds the table's data.
-
-
Constructor Detail
-
TableInfo
public TableInfo(java.lang.String tableName, TupleFile tupleFile)
Construct a table-information object that represents the specified table name and associated tuple file.- Parameters:
tableName
- the name of the table in the databasetupleFile
- the tuple file that holds the table's data
-
-
Method Detail
-
getTableName
public java.lang.String getTableName()
Returns the associated table name.- Returns:
- the associated table name
-
getTupleFile
public TupleFile getTupleFile()
Returns the tuple file that holds the table's data.- Returns:
- the tuple file that holds the table's data.
-
getDBFile
public DBFile getDBFile()
A helper function to simplify retrieving the table'sDBFile
.
-
getSchema
public Schema getSchema()
A helper function to simplify retrieving the table's schema.
-
getStats
public TableStats getStats()
-
-