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

Allow index class to be extended #895

Closed
rockwotj opened this issue Apr 24, 2020 · 4 comments · Fixed by #1788
Closed

Allow index class to be extended #895

rockwotj opened this issue Apr 24, 2020 · 4 comments · Fixed by #1788
Assignees

Comments

@rockwotj
Copy link

Right now indexes are a data class and not able to be modified. The nice thing about columns is that I can add custom column types if I like as there is an interface. However if I want to extend this library to have custom indexes (for example #585 or to be able to change to a hash index) I cannot do that.

@KubqoA
Copy link

KubqoA commented Dec 12, 2020

Is there currently any way to create an index with a function? For example an index in PostgreSQL applied to lower function on the column. E.g. create index lower_column on table (lower(column::text));

@rockwotj
Copy link
Author

As far as I know, there is not with Exposed. Additionally you can not extend exposed to do this either.

@vincent-cognite
Copy link

It seems that it is still not possible to apply a function when creating an index, as suggested above. Is there any plan on supporting this feature?

@bog-walk
Copy link
Member

@rockwotj There have been 3 recently merged PRs that support: partial index in PostgreSQL and other databases, as well as functional index, which will be available in the upcoming version. And providing index type has been supported since version 0.26.1.

If an open/modifiable Index is a feature you still believe is worth adding, please consider opening a feature request on YouTrack, with a specific use case example so we can look further into it.

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

Successfully merging a pull request may close this issue.

5 participants