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

2 Commits

Author SHA1 Message Date
a7a3984d36
add testcase
All checks were successful
continuous-integration/drone/pr Build is passing
Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-04-24 11:39:07 +01:00
152e1bcc69
Add interface to allow structs to provide specific index information
All checks were successful
continuous-integration/drone/pr Build is passing
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>
2022-04-23 18:07:58 +01:00