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

Method SetColor

tools/shell/shell_highlight.cpp:296–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void ShellHighlight::SetColor(HighlightElementType element_type, PrintColor print_color, PrintIntensity intensity,
297 bool user_configured) {
298 if (user_configured) {
299 state.user_configured_elements.insert(element_type);
300 } else {
301 // don't override user configured highlight colors
302 if (state.user_configured_elements.find(element_type) != state.user_configured_elements.end()) {
303 return;
304 }
305 }
306 idx_t i = static_cast<idx_t>(element_type);
307 highlight_elements[i].color = print_color;
308 highlight_elements[i].intensity = intensity;
309}
310
311bool ShellHighlight::SetColor(const char *element_type, const char *color, const char *intensity) {
312 string error_msg;

Callers 1

SetHighlightColorsFunction · 0.80

Calls 6

PrintDatabaseErrorMethod · 0.80
insertMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected