Is it possible to factor out the two requests ? def request(op:String, id:Int) = "id %s %d and modificationid IS NOT NULL".format(op, id) ?