(select_stmt: &SelectStatement, indent: usize)
| 614 | } |
| 615 | |
| 616 | fn print_select_statement(select_stmt: &SelectStatement, indent: usize) { |
| 617 | debug!("{}Distinct: {:?}", get_indent(indent), select_stmt.distinct); |
| 618 | |
| 619 | match &select_stmt.return_items { |
| 620 | SelectItems::Wildcard { .. } => { |
| 621 | debug!("{}Return Items: * (wildcard)", get_indent(indent)); |
| 622 | } |
| 623 | SelectItems::Explicit { items, .. } => { |
| 624 | debug!("{}Return Items ({})", get_indent(indent), items.len()); |
| 625 | for (i, item) in items.iter().enumerate() { |
| 626 | debug!("{}ReturnItem {}", get_indent(indent + 1), i); |
| 627 | print_return_item(item, indent + 2); |
| 628 | } |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | if let Some(from_clause) = &select_stmt.from_clause { |
| 633 | debug!("{}From Clause", get_indent(indent)); |
| 634 | print_from_clause(from_clause, indent + 1); |
| 635 | } |
| 636 | |
| 637 | if let Some(where_clause) = &select_stmt.where_clause { |
| 638 | debug!("{}Where Clause", get_indent(indent)); |
| 639 | print_where_clause(where_clause, indent + 1); |
| 640 | } |
| 641 | |
| 642 | if let Some(group_clause) = &select_stmt.group_clause { |
| 643 | debug!("{}Group By Clause", get_indent(indent)); |
| 644 | print_group_clause(group_clause, indent + 1); |
| 645 | } |
| 646 | |
| 647 | if let Some(having_clause) = &select_stmt.having_clause { |
| 648 | debug!("{}Having Clause", get_indent(indent)); |
| 649 | print_having_clause(having_clause, indent + 1); |
| 650 | } |
| 651 | |
| 652 | if let Some(order_clause) = &select_stmt.order_clause { |
| 653 | debug!("{}Order By Clause", get_indent(indent)); |
| 654 | print_order_clause(order_clause, indent + 1); |
| 655 | } |
| 656 | |
| 657 | if let Some(limit_clause) = &select_stmt.limit_clause { |
| 658 | debug!("{}Limit Clause", get_indent(indent)); |
| 659 | print_limit_clause(limit_clause, indent + 1); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | fn print_from_clause(from_clause: &FromClause, indent: usize) { |
| 664 | debug!( |
no test coverage detected