public class Database extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Database.Transaction |
| Constructor and Description |
|---|
Database(String fileDir)
Creates a new database.
|
| Modifier and Type | Method and Description |
|---|---|
Database.Transaction |
beginTransaction()
Start a new transaction.
|
void |
close()
Close this database.
|
void |
createTable(Schema s,
String tableName)
Create a new table in this database.
|
void |
deleteAllTables()
Delete all tables from this database.
|
boolean |
deleteTable(String tableName)
Delete a table in this database.
|
public Database(String fileDir) throws DatabaseException
fileDir - the directory to put the table files inDatabaseExceptionpublic void createTable(Schema s, String tableName) throws DatabaseException
s - the table schematableName - the name of the tableDatabaseExceptionpublic boolean deleteTable(String tableName)
tableName - the name of the tablepublic void deleteAllTables()
public void close()
public Database.Transaction beginTransaction()
Copyright © 2017. All rights reserved.