def _custom_serializer()

in tools/hologres_excute_sql.py [0:0]


    def _custom_serializer(self, obj: Any) -> Any:
        """Handle common non-serializable database types"""
        if isinstance(obj, (datetime, date)):
            return obj.isoformat()  # Convert to ISO8601 string
        elif isinstance(obj, Decimal):
            return float(obj)  # Convert Decimal to float
        # Add other types that need to be handled (such as bytes)
        raise TypeError(f"Unserializable type {type(obj)}")