#NEWLINE# def backends_data( self , session ) : #NEWLINE# #INDENT# transaction = session . transaction #NEWLINE# models = session . router #NEWLINE# be = self . backend #NEWLINE# rbe = self . read_backend #NEWLINE# model = self . model #NEWLINE# meta = model . _meta #NEWLINE# dirty = self . dirty #NEWLINE# deletes = self . get_delete_query ( session ) #NEWLINE# has_delete = ( deletes is not None ) #NEWLINE# structures = self . _structures #NEWLINE# queries = self . _queries #NEWLINE# if ( dirty or has_delete or ( queries is not None ) or structures ) : #NEWLINE# #INDENT# if ( transaction . signal_delete and has_delete ) : #NEWLINE# #INDENT# models . pre_delete . fire ( model , instances = deletes , session = session ) #NEWLINE# #UNINDENT# if ( dirty and transaction . signal_commit ) : #NEWLINE# #INDENT# models . pre_commit . fire ( model , instances = dirty , session = session ) #NEWLINE# #UNINDENT# if ( be == rbe ) : #NEWLINE# #INDENT# ( yield ( be , session_data ( meta , dirty , deletes , queries , structures ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dirty or has_delete or structures ) : #NEWLINE# #INDENT# ( yield ( be , session_data ( meta , dirty , deletes , ( ) , structures ) ) ) #NEWLINE# #UNINDENT# if queries : #NEWLINE# #INDENT# ( yield ( rbe , session_data ( meta , ( ) , ( ) , queries , ( ) ) ) )