-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Support for partial index #396
Milestone
Comments
As far as I know, both SQLite and PostgreSQL supported partial index, docs:
But MySQL doesn't support it. I think we could introduce this feature in SeaQuery as 2 out of 3 databases support it. |
I have an interest. Could you leave it to me? |
Thank you, I will try it! |
Thanks! @kyoto7250 |
I created WIP PR. #405 I am not in a rush :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in SeaQL/sea-orm#872
Originally posted by @onichandame
Motivation
Sqlite supports a
WHERE
clause on creating an index. see docsThis feature is useful if only a subset of rows need to be indexed. Without it the index must cover all rows, which unnecessarily consumes more disk space.
Proposed Solutions
Something like
sea_query::Index::create().filter(<Condition>)
for use with entities, andsea_query::Index::create().filter_raw("<Where Clause>")
for more freedom.Additional Information
The text was updated successfully, but these errors were encountered: