Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caleb-mabry opened this issue Jul 8, 2024 · 1 comment
Open

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

caleb-mabry opened this issue Jul 8, 2024 · 1 comment

Comments

@caleb-mabry
Copy link
Contributor

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
})
@caleb-mabry
Copy link
Contributor Author

It also looks like if there is disparity in the child dependency, we can try and add overrides?
https://github.com/sequelize/sequelize/blob/main/packages/mysql/src/_internal/data-types-overrides.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant