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

Method executeInternal

src/processor/operator/simple/export_db.cpp:184–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void ExportDB::executeInternal(ExecutionContext* context) {
185 const auto clientContext = context->clientContext;
186 // write the schema.cypher file
187 writeStringStreamToFile(clientContext, getSchemaCypher(clientContext),
188 boundFileInfo.filePaths[0] + "/" + PortDBConstants::SCHEMA_FILE_NAME);
189 if (schemaOnly) {
190 return;
191 }
192 // write the copy.cypher file
193 // for every table, we write COPY FROM statement
194 writeStringStreamToFile(clientContext,
195 getCopyCypher(clientContext, &boundFileInfo, sharedState->canUseParallelReader),
196 boundFileInfo.filePaths[0] + "/" + PortDBConstants::COPY_FILE_NAME);
197 // write the index.cypher file
198 writeStringStreamToFile(clientContext, getIndexCypher(clientContext, boundFileInfo),
199 boundFileInfo.filePaths[0] + "/" + PortDBConstants::INDEX_FILE_NAME);
200 appendMessage("Exported database successfully.", storage::MemoryManager::Get(*clientContext));
201}
202
203} // namespace processor
204} // namespace lbug

Callers

nothing calls this directly

Calls 4

writeStringStreamToFileFunction · 0.85
getSchemaCypherFunction · 0.85
getCopyCypherFunction · 0.85
getIndexCypherFunction · 0.85

Tested by

no test coverage detected