#NEWLINE# def get_dataset_id( self , dataset_dict ) : #NEWLINE# #INDENT# 'Finds the id of a dataset record in the database.\n\n        Returns a dataset_id if a record metching the key fields in\n        dataset_dict is found, None otherwise. The key fields are:\n            aquisition_id and level_id.\n        The dataset_dict must contain values for both of these.' #NEWLINE# sql = ( ( 'SELECT dataset_id FROM dataset\n' + 'WHERE acquisition_id = %(acquisition_id)s AND\n' ) + '    level_id = %(level_id)s;' ) #NEWLINE# result = self . execute_sql_single ( sql , dataset_id ) #NEWLINE# dataset_id = ( result [ 0 ] if result else None ) #NEWLINE# return dataset_id