(t *testing.T)
| 714 | } |
| 715 | |
| 716 | func TestExtractSchemaAndTable(t *testing.T) { |
| 717 | for _, tt := range []struct { |
| 718 | desc string |
| 719 | input string |
| 720 | schema string |
| 721 | table string |
| 722 | }{ |
| 723 | { |
| 724 | desc: "raw table", |
| 725 | input: "table", |
| 726 | schema: "", |
| 727 | table: "table", |
| 728 | }, |
| 729 | { |
| 730 | desc: "quoted table", |
| 731 | input: "`table`", |
| 732 | schema: "", |
| 733 | table: "table", |
| 734 | }, |
| 735 | { |
| 736 | desc: "FQN", |
| 737 | input: "schema.table", |
| 738 | schema: "schema", |
| 739 | table: "table", |
| 740 | }, |
| 741 | { |
| 742 | desc: "FQN with spaces", |
| 743 | input: "schema . table", |
| 744 | schema: "schema", |
| 745 | table: "table", |
| 746 | }, |
| 747 | { |
| 748 | desc: "FQN, both schema and table are quoted", |
| 749 | input: "`schema`.`table`", |
| 750 | schema: "schema", |
| 751 | table: "table", |
| 752 | }, |
| 753 | { |
| 754 | desc: "FQN with spaces, both schema and table are quoted", |
| 755 | input: "`schema` . `table`", |
| 756 | schema: "schema", |
| 757 | table: "table", |
| 758 | }, |
| 759 | { |
| 760 | desc: "FQN, only schema is quoted", |
| 761 | input: "`schema`.table", |
| 762 | schema: "schema", |
| 763 | table: "table", |
| 764 | }, |
| 765 | { |
| 766 | desc: "FQN with spaces, only schema is quoted", |
| 767 | input: "`schema` . table", |
| 768 | schema: "schema", |
| 769 | table: "table", |
| 770 | }, |
| 771 | { |
| 772 | desc: "FQN, only table is quoted", |
| 773 | input: "schema.`table`", |
nothing calls this directly
no test coverage detected