ENH: Support @Index platforms attribute - platform specific indexes

This is a potential alternative to using extra-dll.xml. Might be
appropriate to use over extra-dll in small simple cases.

We might look to extend this in the future to allow full raw platform specific ddl - the ability to specify the entire create index statement.
This commit is contained in:
rob bygrave
2020-01-15 15:47:14 +13:00
parent 7d98355d39
commit 05be24b8b2
33 changed files with 366 additions and 165 deletions
@@ -416,7 +416,7 @@ public class AnnotationFields extends AnnotationParser {
if (columnNames.length == 1 && hasRelationshipItem(prop)) {
throw new RuntimeException("Can't use Index on foreign key relationships.");
}
descriptor.addIndex(new IndexDefinition(columnNames, index.name(), index.unique()));
descriptor.addIndex(new IndexDefinition(columnNames, index.name(), index.unique(), index.platforms()));
}
private void readJsonAnnotations(DeployBeanProperty prop) {