#NEWLINE# def find_until_date_with_duration_and_formula( self , until_date , duration , formula ) : #NEWLINE# #INDENT# cursor = self . _database . cursor ( MySQLdb . cursors . DictCursor ) #NEWLINE# cursor . execute ( 'SELECT * FROM `reports` WHERE date <= %s AND duration = %s AND formula = %s' , ( cursor , duration , formula ) ) #NEWLINE# return dm . Collection ( Report , cursor , self . _datamap )