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

Function FindOption

tools/shell/shell_command_line_option.cpp:208–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 {nullptr, 0, nullptr, nullptr, nullptr, nullptr}};
207
208optional_idx FindOption(const char *name) {
209 for (idx_t c = 0; command_line_options[c].option; c++) {
210 auto &option = command_line_options[c];
211 if (!StringUtil::Equals(name, option.option)) {
212 // not this one
213 continue;
214 }
215 // found it!
216 return c;
217 }
218 return optional_idx();
219}
220
221optional_ptr<const CommandLineOption> ShellState::FindCommandLineOption(const string &option, string &error_msg) const {
222 auto c = FindOption(option.c_str());

Callers 1

FindCommandLineOptionMethod · 0.85

Calls 2

EqualsClass · 0.85
optional_idxClass · 0.50

Tested by

no test coverage detected