#NEWLINE# def _generate_sql( self , params ) : #NEWLINE# #INDENT# query_params = shared . TaskState . projection_params ( ) #NEWLINE# return ( { k : ( v or '' ) for ( k , v ) in { #NEWLINE# #INDENT# 'job_id_predicate' : self . _job_id_predicate ( params , query_params ) , #NEWLINE# 'state_projection' : shared . TaskState . PROJECTION , #NEWLINE# 'state_predicate' : self . _state_predicate ( params , query_params ) , #NEWLINE# 'order' : params [ 'order' ] , #NEWLINE# 'order_by' : params [ 'order_by' ] , #NEWLINE# 'paging' : self . _paging ( params , query_params ) , #NEWLINE# #UNINDENT# } . iteritems ( ) } , query_params )