Skip to content

Improve create_index operation with extra index element settings #697

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

Merged

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 21, 2025

This PR adds a breaking change to create_index operation. From now on columns does not accept a list of column names. Instead it expects a map, so we can support for additional index elements settings.

New settings:

  • collation: name of the collation to use on the column
  • opclass: opclass.name sets the name of the operator class and opclass.params expects a KV pairs for operator class settings
  • sort: change the ordering (ASC or DESC)
  • nulls: change the position of null values in the index (FIRST or LAST)

@kvch kvch force-pushed the feature-support-advanced-index-element-settings branch 2 times, most recently from ea5c5a9 to f646e8a Compare February 21, 2025 13:51
@kvch kvch force-pushed the feature-support-advanced-index-element-settings branch from f646e8a to 62b06b9 Compare February 26, 2025 14:45
@kvch kvch added the breaking-changes breaking changes to pgroll label Feb 26, 2025
@kvch
Copy link
Contributor Author

kvch commented Feb 26, 2025

This PR is ready for review, but go.mod needs to be updated before merge.

@kvch kvch marked this pull request as ready for review February 26, 2025 14:54
@kvch kvch requested a review from andrew-farries February 26, 2025 14:54
@kvch kvch requested a review from andrew-farries February 27, 2025 15:12
Comment on lines 20 to 23
"params": {
"param1": "val",
"param2": "val"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doc is out of date now that params was changed to a slice of strings rather than a map.

@kvch kvch force-pushed the feature-support-advanced-index-element-settings branch from 3d0647e to f0a1574 Compare February 27, 2025 16:41
@kvch kvch requested a review from andrew-farries February 27, 2025 17:03
@kvch kvch merged commit 7b383dc into xataio:main Feb 28, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-changes breaking changes to pgroll
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants