MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / buildIndexAndAdd

Method buildIndexAndAdd

src/storage/table/node_table.cpp:995–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993}
994
995void NodeTable::buildIndexAndAdd(main::ClientContext* context, std::unique_ptr<Index> index,
996 std::optional<uint64_t> queryID) {
997 if (getIndex(index->getName()).has_value()) {
998 throw RuntimeException("Index with name " + index->getName() + " already exists.");
999 }
1000 CommittedIndexInserter indexInserter{this, index.get(),
1001 getVisibleFunc(transaction::Transaction::Get(*context))};
1002 scanIndexColumns(context, indexInserter, *nodeGroups, queryID);
1003 indexes.push_back(IndexHolder{std::move(index)});
1004 setHasChanges();
1005}
1006
1007void NodeTable::dropIndex(const std::string& name) {
1008 DASSERT(getIndex(name) != nullptr);

Callers 2

executeInternalMethod · 0.80

Calls 4

setHasChangesFunction · 0.85
getNameMethod · 0.45
getMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected