retrieval_service/datastore/providers/spanner_gsql.py [537:582]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            )

        # Check if result is None
        if result is None:
            return None, None

        # Convert query result to model instance using model_validate method
        airports = [
            models.Airport.model_validate(
                {key: value for key, value in zip(self.AIRPORT_COLUMNS, a)}
            )
            for a in result
        ]

        return airports[0], None

    async def search_airports(
        self,
        country: Optional[str] = None,
        city: Optional[str] = None,
        name: Optional[str] = None,
    ) -> tuple[list[models.Airport], Optional[str]]:
        """
        Search for airports based on optional parameters.

        Args:
            country (Optional[str]): The country of the airport.
            city (Optional[str]): The city of the airport.
            name (Optional[str]): The name of the airport.

        Returns:
            list[models.Airport]: A list of Airport model instances matching the search criteria.
        """
        with self.__database.snapshot() as snapshot:
            # Construct SQL query based on provided parameters
            query = """
                SELECT * FROM airports
                  WHERE (@country IS NULL OR LOWER(country) LIKE LOWER(@country))
                  AND (@city IS NULL OR LOWER(city) LIKE LOWER(@city))
                  AND (@name IS NULL OR LOWER(name) LIKE '%' || LOWER(@name) || '%')
                """

            # Execute SQL query with parameters
            results = snapshot.execute_sql(
                sql=query,
                params={
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



retrieval_service/datastore/providers/spanner_postgres.py [538:583]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            )

        # Check if result is None
        if result is None:
            return None, None

        # Convert query result to model instance using model_validate method
        airports = [
            models.Airport.model_validate(
                {key: value for key, value in zip(self.AIRPORT_COLUMNS, a)}
            )
            for a in result
        ]

        return airports[0], None

    async def search_airports(
        self,
        country: Optional[str] = None,
        city: Optional[str] = None,
        name: Optional[str] = None,
    ) -> tuple[list[models.Airport], Optional[str]]:
        """
        Search for airports based on optional parameters.

        Args:
            country (Optional[str]): The country of the airport.
            city (Optional[str]): The city of the airport.
            name (Optional[str]): The name of the airport.

        Returns:
            list[models.Airport]: A list of Airport model instances matching the search criteria.
        """
        with self.__database.snapshot() as snapshot:
            # Construct SQL query based on provided parameters
            query = """
                SELECT * FROM airports
                  WHERE ($1 IS NULL OR LOWER(country) LIKE LOWER($1))
                  AND ($2 IS NULL OR LOWER(city) LIKE LOWER($2))
                  AND ($3 IS NULL OR LOWER(name) LIKE '%' || LOWER($3) || '%')
                """

            # Execute SQL query with parameters
            results = snapshot.execute_sql(
                sql=query,
                params={
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



