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

Method insert

src/processor/operator/persistent/insert_executor.cpp:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94nodeID_t NodeInsertExecutor::insert(main::ClientContext* context) {
95 for (auto& evaluator : tableInfo.columnDataEvaluators) {
96 evaluator->evaluate();
97 }
98 auto transaction = Transaction::Get(*context);
99 if (checkConflict(transaction)) {
100 return info.getNodeID();
101 }
102 storage::NodeTableInsertState insertState{*info.nodeIDVector, *tableInfo.pkVector,
103 tableInfo.columnDataVectors};
104 tableInfo.table->initInsertState(context, insertState);
105 tableInfo.table->insert(transaction, insertState);
106 writeColumnVectors(info.columnVectors, tableInfo.columnDataVectors);
107 return info.getNodeID();
108}
109
110void NodeInsertExecutor::skipInsert() const {
111 for (auto& evaluator : tableInfo.columnDataEvaluators) {

Callers

nothing calls this directly

Calls 9

writeColumnVectorsFunction · 0.85
writeColumnVectorsToNullFunction · 0.85
getSelSizeMethod · 0.80
getRelIDMethod · 0.80
evaluateMethod · 0.45
getNodeIDMethod · 0.45
initInsertStateMethod · 0.45
isNullMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected