(
scx: &'a StatementContext<'a>,
ShowObjectsStatement {
object_type,
from,
filter,
}: ShowObjectsStatement<Aug>,
)
| 373 | } |
| 374 | |
| 375 | pub fn show_objects<'a>( |
| 376 | scx: &'a StatementContext<'a>, |
| 377 | ShowObjectsStatement { |
| 378 | object_type, |
| 379 | from, |
| 380 | filter, |
| 381 | }: ShowObjectsStatement<Aug>, |
| 382 | ) -> Result<ShowSelect<'a>, PlanError> { |
| 383 | match object_type { |
| 384 | ShowObjectType::Table { on_source } => show_tables(scx, from, on_source, filter), |
| 385 | ShowObjectType::Source { in_cluster } => show_sources(scx, from, in_cluster, filter), |
| 386 | ShowObjectType::Subsource { on_source } => show_subsources(scx, from, on_source, filter), |
| 387 | ShowObjectType::View => show_views(scx, from, filter), |
| 388 | ShowObjectType::Sink { in_cluster } => show_sinks(scx, from, in_cluster, filter), |
| 389 | ShowObjectType::Type => show_types(scx, from, filter), |
| 390 | ShowObjectType::Object => show_all_objects(scx, from, filter), |
| 391 | ShowObjectType::Role => { |
| 392 | ensure_no_from(from)?; |
| 393 | show_roles(scx, filter) |
| 394 | } |
| 395 | ShowObjectType::Cluster => { |
| 396 | ensure_no_from(from)?; |
| 397 | show_clusters(scx, filter) |
| 398 | } |
| 399 | ShowObjectType::ClusterReplica => { |
| 400 | ensure_no_from(from)?; |
| 401 | show_cluster_replicas(scx, filter) |
| 402 | } |
| 403 | ShowObjectType::Secret => show_secrets(scx, from, filter), |
| 404 | ShowObjectType::Connection => show_connections(scx, from, filter), |
| 405 | ShowObjectType::MaterializedView { in_cluster } => { |
| 406 | show_materialized_views(scx, from, in_cluster, filter) |
| 407 | } |
| 408 | ShowObjectType::Index { |
| 409 | in_cluster, |
| 410 | on_object, |
| 411 | } => show_indexes(scx, from, on_object, in_cluster, filter), |
| 412 | ShowObjectType::Database => { |
| 413 | ensure_no_from(from)?; |
| 414 | show_databases(scx, filter) |
| 415 | } |
| 416 | ShowObjectType::Schema { from: db_from } => { |
| 417 | ensure_no_from(from)?; |
| 418 | show_schemas(scx, db_from, filter) |
| 419 | } |
| 420 | ShowObjectType::Privileges { object_type, role } => { |
| 421 | ensure_no_from(from)?; |
| 422 | show_privileges(scx, object_type, role, filter) |
| 423 | } |
| 424 | ShowObjectType::DefaultPrivileges { object_type, role } => { |
| 425 | ensure_no_from(from)?; |
| 426 | show_default_privileges(scx, object_type, role, filter) |
| 427 | } |
| 428 | ShowObjectType::RoleMembership { role } => { |
| 429 | ensure_no_from(from)?; |
| 430 | show_role_membership(scx, role, filter) |
| 431 | } |
| 432 | ShowObjectType::NetworkPolicy => { |
no test coverage detected