@logExceptions(_LOGGER)<EOL><INDENT>@g_retrySQL<EOL>def modelUpdateResults(self, modelID, results=None, metricValue =None,<EOL>numRecords=None):<DEDENT>
assignmentExpressions = ['<STR_LIT>',<EOL>'<STR_LIT>']<EOL>assignmentValues = []<EOL>if results is not None:<EOL><INDENT>assignmentExpressions.append('<STR_LIT>')<EOL>assignmentValues.append(results)<EOL><DEDENT>if numRecords is not None:<EOL><INDENT>assignmentExpressions.append('<STR_LIT>')<EOL>assignmentValues.append(numRecords)<EOL><DEDENT>if metricValue is not None and (metricValue==metricValue):<EOL><INDENT>assignmentExpressions.append('<STR_LIT>')<EOL>assignmentValues.append(float(metricValue))<EOL><DEDENT>query = '<STR_LIT>''<STR_LIT>'% (self.modelsTableName, '<STR_LIT:U+002C>'.join(assignmentExpressions))<EOL>sqlParams = assignmentValues + [modelID, self._connectionID]<EOL>with ConnectionFactory.get() as conn:<EOL><INDENT>numRowsAffected = conn.cursor.execute(query, sqlParams)<EOL><DEDENT>if numRowsAffected != <NUM_LIT:1>:<EOL><INDENT>raise InvalidConnectionException(<EOL>("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>") % (modelID,self._connectionID, numRowsAffected,))<EOL><DEDENT>
Update the results string, and/or num_records fields of
        a model. This will fail if the model does not currently belong to this
        client (connection_id doesn't match).

        Parameters:
        ----------------------------------------------------------------
        modelID:      model ID of model to modify
        results:      new results, or None to ignore
        metricValue:  the value of the metric being optimized, or None to ignore
        numRecords:   new numRecords, or None to ignore