Skip to content

PROPOSAL: Users should be passing in their specific dialectΒ #42

@caleb-mabry

Description

@caleb-mabry

Is your feature request related to a problem? Please describe.
When someone wants to download out repository, it's important for us to not force them to install all of the different sub-dialects like mariadb or mssql. We want to keep our package light.

Describe the solution you'd like
We have separate submodules as a part of the SDK that implement a specific Abstract Interface that we have defined. I think we could benefit from following the pattern that Sequelize has implemented. What you'll notice is that they have a "core" module that is in charge of ensuring the abstract interfaces are used properly in the core module.

As you can see here: https://github.com/sequelize/sequelize/blob/main/packages/core/src/sequelize.internals.ts#L18-L52, you wont be forced to install a specific module, rather, you will be passing them in. For each supported module, Sequelize has the appropriate Abstract Interface created https://github.com/sequelize/sequelize/tree/main/packages.

Describe alternatives you've considered
I haven't really thought about any additional solutions πŸ˜„ , I had given the thought of maybe doing something like a dev dependency install, but that would only be helpful for developing on the SDK rather than making it install with the appropriate library.,

Additional Context

const {mariaDB} = require('mariaDB')

const connection = OuterbaseConnection({
dialect: mariaDB
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions