[mythtv] Guide service API "Group By" usage
pb.mythtv at gmail.com
Tue Sep 29 13:47:44 UTC 2020
On 9/28/20 1:28 PM, Michael T. Dean wrote:
>> I am not sure if SQL will correctly group items that have null in
>> their group by column.
>> Should null channel numbers be allowed?
> The column is defined as NOT NULL:
> and I don't see any changes anywhere that removed that restriction
> (nor can I imagine changes that would do that). Not sure what the
> preferred approach is regarding coding to handle that invalid data
> transparently or requiring valid data, but we probably should at least
> alert the user that their DB (and, seemingly DB schema) is borked if
> we notice that--whether we fail hard or "just try and see" or insert
> some value in code when reading null from the DB column to try to
> prevent errors. My personal preference is to not spend a lot of time
> coding to handle invalid data, but to log a message that makes it
> possible for the user to figure out what's wrong and correct it. That
> said, I'm not at all against bulletproof (or bullet-resistant?) code.
> (So, I guess that's completely useless advice, and maybe someone else
> can be more helpful. :)
I don't know how the null values occurred. I did not see the user's
database. I am using the services api so maybe it was an empty string.
The xml parser will treat that as null.
I will get a fix for the Guide API to group by callsign and channel
number as you suggested.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-dev