#NEWLINE# def __init__( self , graph , isolation_level = READ_COMMITTED ) : #NEWLINE# #INDENT# self . graph = graph #NEWLINE# self . objects = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . variables = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( isolation_level == Batch . REPEATABLE_READ ) : #NEWLINE# #INDENT# self . commands = 'BEGIN ISOLATION REPEATABLE_READ\n' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . commands = 'BEGIN\n' #NEWLINE# #UNINDENT# for ( name , cls ) in graph . registry . items ( ) : #NEWLINE# #INDENT# broker = get_broker ( cls ) #NEWLINE# if broker : #NEWLINE# #INDENT# self . objects [ cls ] = broker = BatchBroker ( broker ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . objects [ cls ] = broker = BatchBroker ( cls . objects ) #NEWLINE# #UNINDENT# broker_name = getattr ( cls , 'registry_plural' , None ) #NEWLINE# if ( broker_name is not None ) : #NEWLINE# #INDENT# setattr ( self , broker_name , broker )