Interface SqlIndexDefinitionProvider
- All Superinterfaces:
DefinitionProvider
Extension interface to generate vendor-specific SQL index definitions for schema generation.
Implementations are internal Micronaut beans consulted by the schema generator and are not intended as a stable user extension point.
This mirrorsSqlColumnDefinitionProvider but for index DDL.- Since:
- 5.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetIndexDefinition(String indexName, String escapedTableName, String[] columns, boolean escape, Function<String, String> quoter, SqlIndexMapping mapping, Dialect dialect) Produce the index DDL string for the provided mapping and context.booleanWhether this provider supports the given property for the specified dialect.
-
Method Details
-
supports
Whether this provider supports the given property for the specified dialect.- Parameters:
argument- The persistent property argumentdialect- The SQL dialect- Returns:
- true if supported
-
getIndexDefinition
String getIndexDefinition(String indexName, String escapedTableName, String[] columns, boolean escape, Function<String, String> quoter, SqlIndexMapping mapping, Dialect dialect) Produce the index DDL string for the provided mapping and context.- Parameters:
indexName- The index name (already escaped if needed)escapedTableName- The table name (already escaped if needed)columns- The index column names (unescaped)escape- Whether columns should be quoted/escapedquoter- A function to quote an identifier whenescapeis truemapping- The index mappingdialect- The SQL dialect- Returns:
- The CREATE INDEX... DDL string
-