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

Add support for Maria DB (core API implementation) #1692

Open
wants to merge 8 commits into
base: beta
Choose a base branch
from

Conversation

L-Mario564
Copy link
Collaborator

@L-Mario564 L-Mario564 commented Dec 23, 2023

(Partially) Addresses #203.

This PR aims to add support for Maria DB, which simply extends the existent MySQL dialect.

Tasks:

  • Implement mariadb driver.
  • Write core API integration tests for the mariadb driver.

Other changes implemented:

  • Remove fullJoin from MySQL dialect, as neither MySQL nor Maria DB support full joins.
  • Update Drizzle Kit version in the workspace.

Things maybe worth mentioning:

  • int auto_increment is used when creating tables in integration tests instead of serial because the latter creates a bigint in Maria DB.
  • When creating an instance of MySqlDatabase using the mariadb driver, Planetscale mode is used by default as Maria DB doesn't support left join lateral. (Maria DB Issue).

@L-Mario564
Copy link
Collaborator Author

By removing fullJoin from MySQL dialect, #1125 is also addressed.

@L-Mario564 L-Mario564 changed the title Add support for Maria DB Add support for Maria DB (core API implementation) Dec 28, 2023
@L-Mario564
Copy link
Collaborator Author

Due to issues I've discussed with the Drizzle team, this PR will only aim to provide MariaDB support with the core API, which means that RQB will come later and will likely be addressed in a separate PR.

@Creative-Difficulty
Copy link

@L-Mario564 Updates?

@L-Mario564
Copy link
Collaborator Author

@Creative-Difficulty Haven't heard anything from the Drizzle Team. They knew about this PR when I was done adding commits to it in December, but right now I don't know what's the status for adding MariaDB support.

@Creative-Difficulty
Copy link

@drizzle-team

1 similar comment
@VergeDX
Copy link

VergeDX commented Apr 16, 2024

@drizzle-team

@ottok
Copy link

ottok commented Apr 26, 2024

This issue has 8 +1's and 14 hearts. The code has been written and @drizzle-team/@dankochetov
potentially only needs to merge it. Wonder why this isn't this getting any attention?

@L-Mario564
Copy link
Collaborator Author

This issue has 8 +1's and 14 hearts. The code has been written and @drizzle-team/@dankochetov potentially only needs to merge it. Wonder why this isn't this getting any attention?

I can bring the Drizzle Team's attention to this PR, although keep in mind there's a lot of other stuff being worked on, including a new dialect (MSSQL), so I can't promise how soon this will be reviewed/merged.

@sbscan
Copy link

sbscan commented May 8, 2024

maybe they should consider mariadb connector instead of mysql2, which is simply faster.

@nachthammer
Copy link

Can we get some attention for this issue again? Me personally, I prefer postgres over everything, but one company expects our team to use mariadb as the database, but the normal mysql2 driver has a few problems. It would be nice if the native mariadb nodejs driver would be also supported in drizzle-orm. This way the most used databases would be covered. And I guess it should not take too much time, especially because some/most of the code is already written here. (Although I have no idea of this codebase, so it might be, that there is much more to do)

@ottok
Copy link

ottok commented Jul 10, 2024

Could you @AndriiSherman perhaps give some initial feedback so the submitter @L-Mario564 can iterate and finalize this for merging?

@robertsilen
Copy link

Any reason this hasn't gone through yet?

@L-Mario564
Copy link
Collaborator Author

Just to give everyone an update, the team is working on polishing the existing drivers and dialects before integrating any new ones. Do expect this to be merged before Drizzle ORM v1 though.

@robertsilen
Copy link

May I ping to ask what the MariaDB situation is? Thanks for an update 🙏

@LazyClicks
Copy link

May I ping to ask what the MariaDB situation is? Thanks for an update 🙏

i noticed it has been added to v1 roadmap for drizzle-orm, im still waiting for them to support it as well as cockroachdb

@robertsilen
Copy link

Ah yes, I see MariaDB on the roadmap. Is any particular help needed?

Asking due to ixartz/Next-js-Boilerplate#346 (comment)

@LazyClicks
Copy link

Just to give everyone an update, the team is working on polishing the existing drivers and dialects before integrating any new ones. Do expect this to be merged before Drizzle ORM v1 though.

Ah yes, I see MariaDB on the roadmap. Is any particular help needed?

Asking due to ixartz/Next-js-Boilerplate#346 (comment)

seems like its planned after the polishing is done

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

Successfully merging this pull request may close these issues.

8 participants