Skip to content
  • Arthur Neves's avatar
    b83fb847
    Refactor connection handler · b83fb847
    Arthur Neves authored
    ConnectionHandler will not have any knowlodge of AR models now, it will
    only know about the specs.
    Like that we can decouple the two, and allow the same model to use more
    than one connection.
    
    Historically, folks used to create abstract AR classes on the fly in
    order to have multiple connections for the same model, and override the
    connection methods.
    
    With this, now we can override the `specificiation_id` method in the
    model, to return a key, that will be used to find the connection_pool
    from the handler.
    b83fb847
    Refactor connection handler
    Arthur Neves authored
    ConnectionHandler will not have any knowlodge of AR models now, it will
    only know about the specs.
    Like that we can decouple the two, and allow the same model to use more
    than one connection.
    
    Historically, folks used to create abstract AR classes on the fly in
    order to have multiple connections for the same model, and override the
    connection methods.
    
    With this, now we can override the `specificiation_id` method in the
    model, to return a key, that will be used to find the connection_pool
    from the handler.
Loading