async def get_all_syncs_join_with_source_connection(
        self, db: AsyncSession, current_user: schemas.User
    ) -> list[schemas.SyncWithSourceConnection]:
        """Get all syncs join with source connection.

        Args:
            db (AsyncSession): The database session
            current_user (schemas.User): The current user

        Returns:
            list[schemas.SyncWithSourceConnection]: The syncs with their source connections
        """
        # First, get all syncs for the user
        syncs = await super().get_all_for_user(db, current_user)

        # Enrich all syncs efficiently
        enriched_syncs = await self.enricher_for_all(db, syncs)

        # Get all source connections for these syncs using the SyncConnection join table
        stmt = (
            select(Sync, Connection, SyncConnection)
            .join(SyncConnection, Sync.id == SyncConnection.sync_id)
            .join(Connection, SyncConnection.connection_id == Connection.id)
            .where(Sync.organization_id == current_user.organization_id)
            .where(Connection.integration_type == IntegrationType.SOURCE)
        )
        result = await db.execute(stmt)
        rows = result.unique().all()

        # Create a mapping of sync_id to source connection
        sync_to_source_connection = {
            sync.id: schemas.Connection.model_validate(connection) for sync, connection, _ in rows
        }

        # Create SyncWithSourceConnection objects
        result_syncs = []
        for sync in enriched_syncs:
            if sync.id in sync_to_source_connection:
                sync_with_source = schemas.SyncWithSourceConnection(
                    **sync.model_dump(),
                    source_connection=sync_to_source_connection[sync.id],
                )
                result_syncs.append(sync_with_source)

        return result_syncs
Get all syncs join with source connection.

        Args:
            db (AsyncSession): The database session
            current_user (schemas.User): The current user

        Returns:
            list[schemas.SyncWithSourceConnection]: The syncs with their source connections
        
backend/airweave/crud/crud_sync.py