Build SQL for creating an index in the explain schema.
(
index: &CreateIndexStatement<Raw>,
on_object: &ObjectId,
explain_db: &str,
explain_schema: &str,
)
| 708 | |
| 709 | /// Build SQL for creating an index in the explain schema. |
| 710 | fn build_index_sql( |
| 711 | index: &CreateIndexStatement<Raw>, |
| 712 | on_object: &ObjectId, |
| 713 | explain_db: &str, |
| 714 | explain_schema: &str, |
| 715 | ) -> String { |
| 716 | let fqn: FullyQualifiedName = on_object.clone().into(); |
| 717 | let visitor = |
| 718 | NormalizingVisitor::explain(&fqn, explain_db.to_string(), explain_schema.to_string()); |
| 719 | |
| 720 | let mut indexes = vec![index.clone()]; |
| 721 | visitor.normalize_index_references(&mut indexes); |
| 722 | visitor.normalize_index_clusters(&mut indexes); |
| 723 | indexes.into_iter().next().unwrap().to_string() |
| 724 | } |
| 725 | |
| 726 | /// Build SQL for creating a view in the explain schema. |
| 727 | fn build_view_sql( |
no test coverage detected