MCPcopy Create free account
hub / github.com/duckdb/duckdb / ToggleLog

Function ToggleLog

tools/shell/shell_metadata_command.cpp:262–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262MetadataResult ToggleLog(ShellState &state, const vector<string> &args) {
263 if (state.safe_mode) {
264 state.PrintF(PrintOutput::STDERR, ".log cannot be used in -safe mode\n");
265 return MetadataResult::FAIL;
266 }
267 const char *zFile = args[1].c_str();
268 state.CloseOutputFile(state.pLog);
269 state.pLog = state.OpenOutputFile(zFile, 0);
270 return MetadataResult::SUCCESS;
271}
272
273MetadataResult SetMaxRows(ShellState &state, const vector<string> &args) {
274 if (args.size() > 3) {

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
CloseOutputFileMethod · 0.80
OpenOutputFileMethod · 0.80
PrintFMethod · 0.45

Tested by

no test coverage detected