Skip to content

Dynamically require appropriate adapter #1

Description

@aguynamedryan

Currently, a user has to explicitly specify in their Gemfile the database gem they want to with Sequelizer.

It would be great if Sequelizer could detect which adapter the user specified in their configuration and then require the appropriate database gem at runtime.

I haven't found a way to achieve this, but I'm interested in suggestions. Ultimately, I envision something like the following scenario:

  • User includes gem 'sequelizer' in their gem file
  • User creates a database configuration file for Sequelizer
  • User runs bundle to install gems and their dependencies
  • Bundler install sequelizer gem
  • User can run bundle again and this time Sequelizer determines which database adapter the user specified in their configuration and tells Bundler to install that gem?
  • User runs program/script that uses Sequelizer
  • Sequelizer detects which database adapter is in use and requires the appropriate database gem

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions