Posts: 143
Joined: Feb 2017
Reputation:
0
Is there some place I could learn the meaning of cXX columns in db? Some are obvious, some not at all.
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
Shouldn't this be fixed? Code obfuscation is bad.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 1,506
Joined: Nov 2013
it has worked for 10 years, allowing multiple redesigns without completely rewriting the db. sorry, i do not agree that it's ugly.
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
I tend to think that field names should in same way reflect the data within. c01 means nothing.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 16,946
Joined: Feb 2011
Reputation:
256
Its called generalisation - i even tend to say that this is a db pattern
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much:
click here
HowTo setup NFS for Kodi:
NFS (wiki)
HowTo configure avahi (zeroconf):
Avahi_Zeroconf (wiki)
READ THE IOS FAQ!:
iOS FAQ (wiki)
Posts: 1,506
Joined: Nov 2013
some details:
we use the same structure for all kinds of contents (movies, episodes, shows, mvideos)
in the code we map from these columns directly to struct members,
https://github.com/xbmc/xbmc/blob/master...ase.h#L176 and
https://github.com/xbmc/xbmc/blob/master...ase.h#L206
this way we can easily read from db directly into the info structs,
https://github.com/xbmc/xbmc/blob/master....cpp#L2199
and we can change the contents of a column as we see fit, removing/adding info without rewriting the entire db.
the price is small on the code side, and it grants flexibility and less code. the displayed names in a db viewer is irrelevant compared to the code advantages.