def fetch(self, sql, keys=None, index=None): records = [] try: records_xml = xbmcdb("QueryVideoDatabase(%s)" % quote_plus(sql), ) records = findall("<records>(.+?)</records>", records_xml, DOTALL) except: print_exc() return self.parseFields(records, keys, index)
def commit(self, sql): done = False try: done = ("done" in xbmcdb("ExecVideoDatabase(%s)" % quote_plus(sql), ).lower()) except: print_exc() return done
def fetch( self, sql, keys=None, index=None ): records = [] try: records_xml = xbmcdb( "QueryVideoDatabase(%s)" % quote_plus( sql ), ) records = findall( "<records>(.+?)</records>", records_xml, DOTALL ) except: print_exc() return self.parseFields( records, keys, index )
def _set_records_format(self): # format our records start and end xbmcdb("SetResponseFormat()") xbmcdb("SetResponseFormat(OpenRecord,<records>)") xbmcdb("SetResponseFormat(CloseRecord,</records>)")
def commit( self, sql ): done = False try: done = ( "done" in xbmcdb( "ExecVideoDatabase(%s)" % quote_plus( sql ), ).lower() ) except: print_exc() return done
def _set_records_format( self ): # format our records start and end xbmcdb( "SetResponseFormat()" ) xbmcdb( "SetResponseFormat(OpenRecord,<records>)" ) xbmcdb( "SetResponseFormat(CloseRecord,</records>)" )