Example #1
0
 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)
Example #2
0
 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)
Example #3
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)
     adapter = config.adapter.create(options)
     return RelStorage(adapter, name=config.name, options=options)
Example #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)