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

Function SetOutputMode

tools/shell/shell_metadata_command.cpp:381–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381MetadataResult SetOutputMode(ShellState &state, const vector<string> &args) {
382 if (args.size() > 3) {
383 return MetadataResult::PRINT_USAGE;
384 }
385 if (args.size() == 1) {
386 state.PrintF("current output mode: %s\n", ShellState::ModeToString(state.mode));
387 } else {
388 if (!state.SetOutputMode(args[1], args.size() > 2 ? args[2].c_str() : nullptr)) {
389 return MetadataResult::FAIL;
390 }
391 }
392 return MetadataResult::SUCCESS;
393}
394
395MetadataResult QuitProcess(ShellState &, const vector<string> &args) {
396 return MetadataResult::EXIT;

Callers

nothing calls this directly

Calls 4

SetOutputModeMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45
PrintFMethod · 0.45

Tested by

no test coverage detected