MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / openDatabase

Method openDatabase

source/game/StarWorldStorage.cpp:583–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581}
582
583void WorldStorage::openDatabase(BTreeDatabase& db, IODevicePtr device) {
584 db.setContentIdentifier("World4");
585 db.setKeySize(5);
586 db.setIODevice(std::move(device));
587 db.setBlockSize(2048);
588 db.setAutoCommit(false);
589 db.open();
590
591 if (db.contentIdentifier() != "World4" || db.keySize() != 5)
592 throw WorldStorageException::format("World database format is too old or unrecognized!");
593}
594
595WorldStorage::WorldStorage() {
596 auto storageConfig = Root::singleton().assets()->json("/worldstorage.config");

Callers

nothing calls this directly

Calls 9

setContentIdentifierMethod · 0.80
setKeySizeMethod · 0.80
setIODeviceMethod · 0.80
setBlockSizeMethod · 0.80
setAutoCommitMethod · 0.80
contentIdentifierMethod · 0.80
keySizeMethod · 0.80
formatFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected