def SearchFileNameTable(self, fileName):
    """
    Search FileName table.

    Find the show id for a given file name.

    Parameters
    ----------
      fileName : string
        File name to look up in table.

    Returns
    ----------
      int or None
        If a match is found in the database table the show id for this
        entry is returned, otherwise this returns None.
    """
    goodlogging.Log.Info("DB", "Looking up filename string '{0}' in database".format(fileName), verbosity=self.logVerbosity)

    queryString = "SELECT ShowID FROM FileName WHERE FileName=?"
    queryTuple = (fileName, )

    result = self._ActionDatabase(queryString, queryTuple, error = False)

    if result is None:
      goodlogging.Log.Info("DB", "No match found in database for '{0}'".format(fileName), verbosity=self.logVerbosity)
      return None
    elif len(result) == 0:
      return None
    elif len(result) == 1:
      goodlogging.Log.Info("DB", "Found file name match: {0}".format(result), verbosity=self.logVerbosity)
      return result[0][0]
    elif len(result) > 1:
      goodlogging.Log.Fatal("DB", "Database corrupted - multiple matches found in database table for: {0}".format(result))
def SearchFileNameTable ( self , fileName ) : goodlogging . Log . Info ( "DB" , "Looking up filename string '{0}' in database" . format ( fileName ) , verbosity = self . logVerbosity ) queryString = "SELECT ShowID FROM FileName WHERE FileName=?" queryTuple = ( fileName , ) result = self . _ActionDatabase ( queryString , queryTuple , error = False ) if result is None : goodlogging . Log . Info ( "DB" , "No match found in database for '{0}'" . format ( fileName ) , verbosity = self . logVerbosity ) return None elif len ( result ) == 0 : return None elif len ( result ) == 1 : goodlogging . Log . Info ( "DB" , "Found file name match: {0}" . format ( result ) , verbosity = self . logVerbosity ) return result [ 0 ] [ 0 ] elif len ( result ) > 1 : goodlogging . Log . Fatal ( "DB" , "Database corrupted - multiple matches found in database table for: {0}" . format ( result ) )
Search FileName table.

    Find the show id for a given file name.

    Parameters
    ----------
      fileName : string
        File name to look up in table.

    Returns
    ----------
      int or None
        If a match is found in the database table the show id for this
        entry is returned, otherwise this returns None.