docs: def _UpdateDatabaseFromResponse(self, response, mode):
      """
      Update database table given a user input in the form
      "TABLENAME COL1=VAL1 COL2=VAL2".
  
      Either ADD or DELETE from table depending on mode argument.
  
      If the change succeeds the updated table is printed to stdout.
  
      Parameters
      ----------
        response : string
          User input.
  
        mode : string
          Valid values are 'ADD' or 'DEL'.
  
      Returns
      ----------
        None
          Will always return None. There are numerous early returns in the cases
          where the database update cannot proceed for any reason.
      """
      # Get tableName from user input (form TABLENAME COL1=VAL1 COL2=VAL2 etc)
      try:
        tableName, tableColumns = response.split(' ', 1)
      except ValueError:
        goodlogging.Log.Info("DB", "Database update failed - failed to extract table name from response")
        return None
  
      # Check user input against known table list
      if tableName not in self._tableDict.keys():
        goodlogging.Log.Info("DB", "Database update failed - unkown table name: {0}".format(tableName))
        return None
  
      # Build re pattern to extract column from user input (form TABLENAME COL1=VAL1 COL2=VAL2 etc)
      rowSelect = []
      for column in self._tableDict[tableName]:
        colPatternList = ['(?:{0})'.format(i) for i in self._tableDict[tableName] if i != column]
        colPatternList.append('(?:$)')
        colPatternMatch = '|'.join(colPatternList)
        matchPattern = '{0}.*?{1}=(.+?)\s*(?:{2})'.format(tableName, column, colPatternMatch)
  
        match = re.findall(matchPattern, response)
  
        # Match should be in form [(VAL1, VAL2, VAL3, etc.)]
        if len(match) == 1:
          rowSelect.append((column, match[0]))
        elif len(match) > 1:
          goodlogging.Log.Info('DB', 'Database update failed - multiple matches found for table {0} column {1}'.format(tableName, column))
          return None
  
      if len(rowSelect) == 0:
        goodlogging.Log.Info('DB', 'Database update failed - no row selection critera found in response')
        return None
  
      # Print selected rows
      rowCount = self._PrintDatabaseTable(tableName, rowSelect)
  
      # Do DELETE flow
      if mode.upper() == 'DEL':
        if rowCount == 0:
          goodlogging.Log.Info("DB", "Database update failed - no rows found for given search critera: {0}".format(response))
          return None
  
        deleteConfirmation = goodlogging.Log.Input("DB", "***WARNING*** DELETE THESE ROWS FROM {0} TABLE? [y/n]: ".format(tableName))
        deleteConfirmation = util.ValidUserResponse(deleteConfirmation, ('y', 'n'))
  
        if deleteConfirmation.lower() == 'n':
          goodlogging.Log.Info("DB", "Database table row delete cancelled")
          return None
  
        # Build delete database query (form DELETE FROM TableName WHERE COL1=?, COL2=?)
        dbQuery = "DELETE FROM {0}".format(tableName) \
                    + " WHERE " \
                    + ' AND '.join(['{0}=?'.format(i) for i, j in rowSelect])
        dbQueryParams = [j for i, j in rowSelect]
  
        self._ActionDatabase(dbQuery, dbQueryParams)
  
        goodlogging.Log.Info("DB", "Deleted {0} row(s) from database table {0}:".format(rowCount, tableName))
  
      # Do ADD flow
      elif mode.upper() == 'ADD':
        if rowCount != 0:
          goodlogging.Log.Info("DB", "Database update failed - a row already exists for the given critera: {0}".format(response))
          return None
  
        # Build insert database query (form INSERT INTO TableName (COL1, COL2) VALUES (?,?))
        dbQuery = "INSERT INTO {0} (".format(tableName) \
                    + ', '.join(['{0}'.format(i) for i, j in rowSelect]) \
                    + ") VALUES (" \
                    + ', '.join(['?']*len(rowSelect)) \
                    + ")"
        dbQueryParams = [j for i, j in rowSelect]
  
        self._ActionDatabase(dbQuery, dbQueryParams)
  
        goodlogging.Log.Info("DB", "Added row to database table {0}:".format(tableName))
  
      # Print resulting database table
      self._PrintDatabaseTable(tableName)