Interface SqlTableMappingValidator


@Internal public interface SqlTableMappingValidator
Validates SQL table mappings against the actual table metadata from the database.

Implementations of this interface are responsible for checking that the table and column definitions extracted from a PersistentEntity match the corresponding metadata from the database.

This interface is intended for internal use within the Micronaut Data framework.

Since:
4.13.0
Author:
radovanradic
  • Method Details

    • validateTable

      void validateTable(@NonNull @NonNull SqlTableMapping tableMapping, @NonNull @NonNull SqlTableMetadata tableMetadata)
      Validates a table definition based on PersistentEntity mapping against its actual corresponding metadata from the database.
      Parameters:
      tableMapping - The SQL table mapping from PersistentEntity to validate
      tableMetadata - The SQL table metadata from the database to compare against
      Throws:
      SchemaValidationException - When expected column not found or is not matching expected type
    • getSupportedDialect

      @NonNull @NonNull Dialect getSupportedDialect()
      Returns the SQL dialect supported by this validator.
      Returns:
      the supported SQL dialect, never null