Guide to cXX column names in the database?
#1
Is there some place I could learn the meaning of cXX columns in db? Some are obvious, some not at all.
Reply
#2
In the code. For movies you can find it at https://github.com/xbmc/xbmc/blob/master...ase.h#L176. The other video types are covered further down in the same header file. And yes, it's ugly Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Cool, thanks. And yes, the cXX idea is... audacious Wink
Reply
#4
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.)
Reply
#5
(2017-06-05, 23:39)nickr Wrote: Shouldn't this be fixed? Code obfuscation is bad.
Not really. It just requires a complete database and interface layer rewrite
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
(2017-06-05, 23:59)Martijn Wrote:
(2017-06-05, 23:39)nickr Wrote: Shouldn't this be fixed? Code obfuscation is bad.
Not really. It just requires a complete database and interface layer rewrite
which is currently WIP
Reply
#7
it has worked for 10 years, allowing multiple redesigns without completely rewriting the db. sorry, i do not agree that it's ugly.
Reply
#8
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.)
Reply
#9
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)
Reply
#10
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.
Reply
#11
(2017-06-08, 09:15)ironic_monkey Wrote: the displayed names in a db viewer is irrelevant compared to the code advantages.

This would be true if they had never been used by humans.

I see it as old dev fallacy - easier code equals to better code.
Reply

Logout Mark Read Team Forum Stats Members Help
Guide to cXX column names in the database?0