(
desc: SourceDesc,
resolved_source_name: ResolvedItemName,
storage_configuration: &StorageConfiguration,
)
| 1663 | } |
| 1664 | |
| 1665 | async fn purify_alter_source_refresh_references( |
| 1666 | desc: SourceDesc, |
| 1667 | resolved_source_name: ResolvedItemName, |
| 1668 | storage_configuration: &StorageConfiguration, |
| 1669 | ) -> Result<PurifiedStatement, PlanError> { |
| 1670 | let retrieved_source_references = match desc.connection { |
| 1671 | GenericSourceConnection::Postgres(pg_source_connection) => { |
| 1672 | // Get PostgresConnection for generating subsources. |
| 1673 | let pg_connection = &pg_source_connection.connection; |
| 1674 | |
| 1675 | let config = pg_connection |
| 1676 | .config( |
| 1677 | &storage_configuration.connection_context.secrets_reader, |
| 1678 | storage_configuration, |
| 1679 | InTask::No, |
| 1680 | ) |
| 1681 | .await?; |
| 1682 | |
| 1683 | let client = config |
| 1684 | .connect( |
| 1685 | "postgres_purification", |
| 1686 | &storage_configuration.connection_context.ssh_tunnel_manager, |
| 1687 | ) |
| 1688 | .await?; |
| 1689 | let reference_client = SourceReferenceClient::Postgres { |
| 1690 | client: &client, |
| 1691 | publication: &pg_source_connection.publication, |
| 1692 | database: &pg_connection.database, |
| 1693 | }; |
| 1694 | reference_client.get_source_references().await? |
| 1695 | } |
| 1696 | GenericSourceConnection::MySql(mysql_source_connection) => { |
| 1697 | let mysql_connection = &mysql_source_connection.connection; |
| 1698 | let config = mysql_connection |
| 1699 | .config( |
| 1700 | &storage_configuration.connection_context.secrets_reader, |
| 1701 | storage_configuration, |
| 1702 | InTask::No, |
| 1703 | ) |
| 1704 | .await?; |
| 1705 | |
| 1706 | let mut conn = config |
| 1707 | .connect( |
| 1708 | "mysql purification", |
| 1709 | &storage_configuration.connection_context.ssh_tunnel_manager, |
| 1710 | ) |
| 1711 | .await?; |
| 1712 | |
| 1713 | let reference_client = SourceReferenceClient::MySql { |
| 1714 | conn: &mut conn, |
| 1715 | include_system_schemas: false, |
| 1716 | }; |
| 1717 | reference_client.get_source_references().await? |
| 1718 | } |
| 1719 | GenericSourceConnection::SqlServer(sql_server_source) => { |
| 1720 | // Open a connection to the upstream SQL Server instance. |
| 1721 | let sql_server_connection = &sql_server_source.connection; |
| 1722 | let config = sql_server_connection |
no test coverage detected