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

feat(mysql): add support for vector indices #139

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

ammubhave
Copy link
Contributor

@ammubhave ammubhave commented Oct 17, 2024

PlanetScale recently added vector support to their fork of mysql. If a vector index is added to it, then sea-orm generate entity command panics because the index type is not recognized by its parser.

https://planetscale.com/docs/concepts/vectors#vector-index-parameters

This PR adds support for recognizing vector indices as a valid index type.

Test Plan: Created a planet scale database with a vector index, and ran generate entity command. Verified that after this change, the command no longer crashes and creates valid files.

PR Info

  • Closes
  • Dependencies:
  • Dependents:

New Features

  • MySQL VECTOR index support

Bug Fixes

Breaking Changes

Changes

PlanetScale recently added vector support to their fork of mysql.
If a vector index is added to it, then sea-orm generate entity command
panics because the index type is not recognized by its parser.

This PR adds support for recognizing vector indices as a valid index
type.

Test Plan: Created a planet scale database with a vector index, and ran
`generate entity` command. Verified that after this change, the command
no longer crashes and creates valid files.
@tyt2y3
Copy link
Member

tyt2y3 commented Oct 18, 2024

sorry, I don't yet have a guideline on how to handle third-party database vendors with proprietary extensions

@tyt2y3
Copy link
Member

tyt2y3 commented Oct 21, 2024

may be at least we put on an additional feature guard planet-scale?

@ammubhave
Copy link
Contributor Author

Gated behind planetscale feature flag. (not using kebab-case because it seems most of planetscale ecosystem uses it as a single word e.g. https://crates.io/crates/planetscale-driver)

@tyt2y3 tyt2y3 merged commit c789ecc into SeaQL:master Oct 25, 2024
27 checks passed
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.

2 participants