Add interface to allow structs to provide specific index information #2137

Merged
lunny merged 2 commits from zeripath/xorm:index-manipulation into master 2022-04-24 11:34:28 +00:00
Contributor

The current mechanism for adding information about indices cannot express the ordering
of the columns in the index or add sorting information.

Here we add a new interface TableIndices which a struct would implement to provide
a slice of *schema.Index to provide additional indices to that gleaned from the tags.

Signed-off-by: Andrew Thornton art27@cantab.net

The current mechanism for adding information about indices cannot express the ordering of the columns in the index or add sorting information. Here we add a new interface TableIndices which a struct would implement to provide a slice of *schema.Index to provide additional indices to that gleaned from the tags. Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added the
kind
enhancement
label 2022-04-23 17:08:41 +00:00
zeripath added 1 commit 2022-04-23 17:08:42 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
152e1bcc69
Add interface to allow structs to provide specific index information
The current mechanism for adding information about indices cannot express the ordering
of the columns in the index or add sorting information.

Here we add a new interface TableIndices which a struct would implement to provide
a slice of *schema.Index to provide additional indices to that gleaned from the tags.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Owner

Could you add some tests for that?

Could you add some tests for that?
zeripath added 1 commit 2022-04-24 10:39:31 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
a7a3984d36
add testcase
Signed-off-by: Andrew Thornton <art27@cantab.net>
lunny approved these changes 2022-04-24 11:33:45 +00:00
lunny added this to the 1.3.1 milestone 2022-04-24 11:34:02 +00:00
lunny merged commit 26d291bbc3 into master 2022-04-24 11:34:28 +00:00
zeripath deleted branch index-manipulation 2022-04-24 12:05:00 +00:00
Sign in to join this conversation.
No description provided.