(@NotNull String dbName, @NotNull Table table)
| 311 | } |
| 312 | |
| 313 | public @NotNull Database addTable(@NotNull String dbName, @NotNull Table table) { |
| 314 | TableKey.tables.put(table.getId(), table.getName()); |
| 315 | var db = getDatabase(dbName); |
| 316 | if (tables.putIfAbsent(table.getId(), table) != null) |
| 317 | throw new IllegalStateException("duplicate table id=" + table.getId()); |
| 318 | if (tableNameMap.putIfAbsent(table.getName(), table) != null) |
| 319 | throw new IllegalStateException("duplicate table name=" + table.getName()); |
| 320 | db.addTable(table); |
| 321 | return db; |
| 322 | } |
| 323 | |
| 324 | // Hot Install 内部使用。 |
| 325 | public void __install_prepare__() { |
no test coverage detected