[mythtv-users] channels.conf

Ian Campbell ijc at hellion.org.uk
Mon Apr 2 11:49:39 UTC 2018


On Mon, 2018-04-02 at 13:42 +0200, Hika van den Hoven wrote:
> Hoi Simon,
> 
> Monday, April 2, 2018, 1:13:43 PM, you wrote:
> 
> > Ian Campbell <ijc at hellion.org.uk> wrote:
> 
> >> On Sun, 2018-04-01 at 20:07 +0200, Klaus Becker wrote:
> >> There are bindings for the channels table in the Python, Perl and
> php
> >> bindings ...
> >> 
> >> ... to my shame my own fixup/cleanup script is still written in
> SQL which runs directly against the DB, which is rather risky ...
> 
> > What is the difference between directly manipulating the database
> > via Python, Perl, or php - and directly manipulating the database
> > via SQL ? Both have scope for "messing things up" by directly
> > manipulating the data without the safety net of going through
> MythTV
> > which "should" enforce data consistency etc.
> 
> The language does not matter, but going through the API includes all
> kind of verifications, which is absent on using strait SQL.

I get the feeling that some of the bindings are a pretty thin veneer
over the DB tables rather than going "through the API" as such, but
they do have some amount of sanity checking (however small) which the
SQL approach lacks. That small amount of checking is worthwhile though 
(e.g. it would be hard to drop every entry in a table via the bindings
without trying quite hard, while one small slip in a WHERE clause makes
it nice and easy).

IMHO using the provided interfaces/bindings seems like a good habit to
be in rather than digging into the SQL.

Ian.


More information about the mythtv-users mailing list