MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / as_str

Method as_str

src/sql/src/session/hint.rs:123–146  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

121 }
122
123 pub fn as_str(&self) -> &'static str {
124 match self {
125 ApplicationNameHint::Unspecified(_) => UNSPECIFIED_LABEL,
126 ApplicationNameHint::Unrecognized(_) => UNRECOGNIZED_LABEL,
127 ApplicationNameHint::Psql(_) => PSQL_LABEL,
128 ApplicationNameHint::Dbt(_) => DBT_LABEL,
129 ApplicationNameHint::WebConsole(_) => WEB_CONSOLE_LABEL,
130 ApplicationNameHint::WebConsoleShell(_) => WEB_CONSOLE_SHELL_LABEL,
131 ApplicationNameHint::MzPsql(_) => MZ_PSQL_LABEL,
132 ApplicationNameHint::MaterializeFivetranDestination(_) => {
133 MATERIALIZE_FIVETRAN_DESTINATION_LABEL
134 }
135 ApplicationNameHint::TablePlus(_) => TABLE_PLUS_LABEL,
136 ApplicationNameHint::MzVscode(_) => MZ_VSCODE_LABEL,
137 ApplicationNameHint::MzGrafanaIntegration(_) => MZ_GRAFANA_LABEL,
138 ApplicationNameHint::MzMcpAgent(_) => MZ_MCP_AGENT_LABEL,
139 ApplicationNameHint::MzMcpDeveloper(_) => MZ_MCP_DEVELOPER_LABEL,
140 ApplicationNameHint::TerraformProviderMaterialize(_) => {
141 TERRAFORM_PROVIDER_MATERIALIZE_LABEL
142 }
143 ApplicationNameHint::DataGrip(_) => DATA_GRIP_LABEL,
144 ApplicationNameHint::DBeaver(_) => D_BEAVER_LABEL,
145 }
146 }
147
148 /// Returns whether or not we should trace errors for this requests with this application name.
149 pub fn should_trace_errors(&self) -> bool {

Callers 15

resolveMethod · 0.45
sql_implFunction · 0.45
try_from_valueMethod · 0.45
ident_refFunction · 0.45
opFunction · 0.45
try_fromMethod · 0.45
fmtMethod · 0.45
fold_schema_nameMethod · 0.45
fold_database_nameMethod · 0.45
fold_cluster_nameMethod · 0.45
fold_role_nameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected