Skip to content
  • Jean Boussier's avatar
    009c7e74
    Refactor lookup of connection adapters · 009c7e74
    Jean Boussier authored
    Right now adapters have to expose a rather byzantine API:
    
      - They must be defined in `active_record/connection_adapters/<name>_adapter`
      - They must define `ConnectionHandling.<name>_adapter_class`
      - They must define `ConnectionHandling.<name>_connection`
    
    All this is not very DRY and a bit annoying. Additionally it makes
    it very hard to define aliases (e.g. `mysql` => `trilogy`), or to
    substitute a default adapter for a specialized one.
    
    This refactor aims at making all this easier by exposing a simple
    `register` method, that third party adapters can call from a Railtie.
    009c7e74
    Refactor lookup of connection adapters
    Jean Boussier authored
    Right now adapters have to expose a rather byzantine API:
    
      - They must be defined in `active_record/connection_adapters/<name>_adapter`
      - They must define `ConnectionHandling.<name>_adapter_class`
      - They must define `ConnectionHandling.<name>_connection`
    
    All this is not very DRY and a bit annoying. Additionally it makes
    it very hard to define aliases (e.g. `mysql` => `trilogy`), or to
    substitute a default adapter for a specialized one.
    
    This refactor aims at making all this easier by exposing a simple
    `register` method, that third party adapters can call from a Railtie.
Loading