MCPcopy Create free account
hub / github.com/e2wugui/zeze / addTable

Method addTable

ZezeJava/ZezeJava/src/main/java/Zeze/Application.java:313–322  ·  view source on GitHub ↗
(@NotNull String dbName, @NotNull Table table)

Source from the content-addressed store, hash-verified

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__() {

Callers 1

openDynamicTableMethod · 0.95

Calls 5

getDatabaseMethod · 0.95
putMethod · 0.65
getIdMethod · 0.65
getNameMethod · 0.65
putIfAbsentMethod · 0.65

Tested by

no test coverage detected