Class SqlSchemaUtils

java.lang.Object
io.micronaut.data.model.query.builder.sql.SqlSchemaUtils

@Internal public final class SqlSchemaUtils extends Object
Utility class providing methods for working with SQL schema definitions.
Since:
4.13.0
Author:
radovanradic
  • Field Details

  • Method Details

    • getSqlTableMappings

      public static List<SqlTableMapping> getSqlTableMappings(PersistentEntity entity, Dialect dialect)
      Returns SQL table mappings for an entity using no external definition providers.

      This convenience overload is intended for callers that don't need custom column/index DDL provider extensions.

      Parameters:
      entity - The entity
      dialect - The SQL dialect used to render vendor-specific definitions
      Returns:
      The SQL table definitions for the given entity
      Since:
      5.0.0
    • getSqlTableMappings

      public static List<SqlTableMapping> getSqlTableMappings(List<DefinitionProvider> definitionProviders, PersistentEntity entity, Dialect dialect)
      Returns list of SqlTableMapping for persistent entity. It will contain main entity table and potentially joined tables.
      Parameters:
      definitionProviders - the list of DefinitionProvider (column/index DDL providers)
      entity - The entity
      dialect - The SQL dialect used to render vendor-specific definitions.
      Returns:
      The SQL table definitions for the given entity
      Since:
      5.0.0