Returns the Table object for the given dbName/tableName. Throws if the database does not exists. Returns null if the table does not exist. TODO: Clean up the inconsistent error behavior (throwing vs. returning null).
(String dbName, String tableName)
| 240 | * TODO: Clean up the inconsistent error behavior (throwing vs. returning null). |
| 241 | */ |
| 242 | public Table getTable(String dbName, String tableName) |
| 243 | throws DatabaseNotFoundException { |
| 244 | Db db = getDb(dbName); |
| 245 | if (db == null) { |
| 246 | throw new DatabaseNotFoundException("Database '" + dbName + "' not found"); |
| 247 | } |
| 248 | return db.getTable(tableName); |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Returns the table with the given name if it's completely loaded in the cache. |
no test coverage detected