#NEWLINE# def as_sql( self , compiler , connection ) : #NEWLINE# #INDENT# connection . ops . check_expression_support ( self ) #NEWLINE# expressions = [ ] #NEWLINE# expression_params = [ ] #NEWLINE# ( sql , params ) = self . compile ( self . lhs , compiler , connection ) #NEWLINE# expressions . append ( sql ) #NEWLINE# expression_params . extend ( params ) #NEWLINE# ( sql , params ) = self . compile ( self . rhs , compiler , connection ) #NEWLINE# expressions . append ( sql ) #NEWLINE# expression_params . extend ( self ) #NEWLINE# expression_wrapper = '(%s)' #NEWLINE# sql = connection . ops . combine_duration_expression ( self . connector , expressions ) #NEWLINE# return ( ( expression_wrapper % sql ) , expression_params )