Returns a human readable name of the plan. Meant for use in messages sent back to a user.
(&self)
| 334 | |
| 335 | /// Returns a human readable name of the plan. Meant for use in messages sent back to a user. |
| 336 | pub fn name(&self) -> &str { |
| 337 | match self { |
| 338 | Plan::CreateConnection(_) => "create connection", |
| 339 | Plan::CreateDatabase(_) => "create database", |
| 340 | Plan::CreateSchema(_) => "create schema", |
| 341 | Plan::CreateRole(_) => "create role", |
| 342 | Plan::CreateCluster(_) => "create cluster", |
| 343 | Plan::CreateClusterReplica(_) => "create cluster replica", |
| 344 | Plan::CreateSource(_) => "create source", |
| 345 | Plan::CreateSources(_) => "create source", |
| 346 | Plan::CreateSecret(_) => "create secret", |
| 347 | Plan::CreateSink(_) => "create sink", |
| 348 | Plan::CreateTable(_) => "create table", |
| 349 | Plan::CreateView(_) => "create view", |
| 350 | Plan::CreateMaterializedView(_) => "create materialized view", |
| 351 | Plan::CreateIndex(_) => "create index", |
| 352 | Plan::CreateType(_) => "create type", |
| 353 | Plan::CreateNetworkPolicy(_) => "create network policy", |
| 354 | Plan::Comment(_) => "comment", |
| 355 | Plan::DiscardTemp => "discard temp", |
| 356 | Plan::DiscardAll => "discard all", |
| 357 | Plan::DropObjects(plan) => match plan.object_type { |
| 358 | ObjectType::Table => "drop table", |
| 359 | ObjectType::View => "drop view", |
| 360 | ObjectType::MaterializedView => "drop materialized view", |
| 361 | ObjectType::Source => "drop source", |
| 362 | ObjectType::Sink => "drop sink", |
| 363 | ObjectType::Index => "drop index", |
| 364 | ObjectType::Type => "drop type", |
| 365 | ObjectType::Role => "drop roles", |
| 366 | ObjectType::Cluster => "drop clusters", |
| 367 | ObjectType::ClusterReplica => "drop cluster replicas", |
| 368 | ObjectType::Secret => "drop secret", |
| 369 | ObjectType::Connection => "drop connection", |
| 370 | ObjectType::Database => "drop database", |
| 371 | ObjectType::Schema => "drop schema", |
| 372 | ObjectType::Func => "drop function", |
| 373 | ObjectType::NetworkPolicy => "drop network policy", |
| 374 | }, |
| 375 | Plan::DropOwned(_) => "drop owned", |
| 376 | Plan::EmptyQuery => "do nothing", |
| 377 | Plan::ShowAllVariables => "show all variables", |
| 378 | Plan::ShowCreate(_) => "show create", |
| 379 | Plan::ShowColumns(_) => "show columns", |
| 380 | Plan::ShowVariable(_) => "show variable", |
| 381 | Plan::InspectShard(_) => "inspect shard", |
| 382 | Plan::SetVariable(_) => "set variable", |
| 383 | Plan::ResetVariable(_) => "reset variable", |
| 384 | Plan::SetTransaction(_) => "set transaction", |
| 385 | Plan::StartTransaction(_) => "start transaction", |
| 386 | Plan::CommitTransaction(_) => "commit", |
| 387 | Plan::AbortTransaction(_) => "abort", |
| 388 | Plan::Select(_) => "select", |
| 389 | Plan::Subscribe(_) => "subscribe", |
| 390 | Plan::CopyFrom(_) => "copy from", |
| 391 | Plan::CopyTo(_) => "copy to", |
| 392 | Plan::ExplainPlan(_) => "explain plan", |
| 393 | Plan::ExplainPushdown(_) => "EXPLAIN FILTER PUSHDOWN", |
no outgoing calls