[mythtv] Patch for generic SQL query

David Shay david at shay.net
Wed Apr 27 05:21:11 UTC 2005


As discussed on IRC last night, here is a patch to provide a generic SQL 
service through the myth protocol.  This will be helpful to external programs 
such as mvpmc and now mythroku which cannot easily access mysql directly, and 
also allows for generic database access (non-mysql).  These programs can use 
this for things like accessing the commercial cutlist, etc.

I didn't bump the protocol version, since it is an extension, but I could 
submit a patch with that included if you want.

The new protocol command is QUERY_SQL, and it accepts any valid SQL command 
after that. For instance:

QUERY_SQL SELECT sourceid,lineupid from videosource;

A standard []"[] separated string list is returned.  The source application 
needs to keep track of column counts to parse the data appropriately, just 
like it does with program info.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: querysql.diff
Type: text/x-diff
Size: 2556 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050427/3e290049/querysql.bin


More information about the mythtv-dev mailing list