예제 #1
0
파일: config.py 프로젝트: zodb/relstorage
 def open(self):
     config = self.config
     # Hoist the driver setting to the section we really want it.
     config.driver = config.adapter.config.driver
     config.adapter.config.driver = None
     options = Options.copy_valid_options(config)
     adapter = config.adapter.create(options)
     return RelStorage(adapter, name=config.name, options=options)
예제 #2
0
파일: config.py 프로젝트: olst/relstorage
 def open(self):
     config = self.config
     # Hoist the driver setting to the section we really want it.
     config.driver = config.adapter.config.driver
     config.adapter.config.driver = None
     options = Options.copy_valid_options(config)
     adapter = config.adapter.create(options)
     return RelStorage(adapter, name=config.name, options=options)
예제 #3
0
파일: config.py 프로젝트: lungj/relstorage
 def open(self):
     config = self.config
     # Hoist the driver setting to the section we really want it.
     config.driver = config.adapter.config.driver
     # But don't remove it or otherwise mutate the config object;
     # that would prevent us from being correctly opened again.
     #config.adapter.config.driver = None
     options = Options.copy_valid_options(config)
     adapter = config.adapter.create(options)
     return RelStorage(adapter, name=config.name, options=options)
예제 #4
0
 def open(self):
     config = self.config
     # Hoist the driver setting to the section we really want it.
     config.driver = config.adapter.config.driver
     # But don't remove it or otherwise mutate the config object;
     # that would prevent us from being correctly opened again.
     #config.adapter.config.driver = None
     options = Options.copy_valid_options(config)
     options.adapter = config.adapter
     # The adapter factories may modify the global options (or raise an exception)
     # if something at the top-level is specifically not allowed based on
     # their configuration.
     adapter = config.adapter.create(options)
     return RelStorage(adapter, name=config.name, options=options)