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 Summary
Modifier and TypeMethodDescription@NonNull Dialect
Returns the SQL dialect supported by this validator.void
validateTable
(@NonNull SqlTableMapping tableMapping, @NonNull SqlTableMetadata tableMetadata) Validates a table definition based onPersistentEntity
mapping against its actual corresponding metadata from the database.
-
Method Details
-
validateTable
void validateTable(@NonNull @NonNull SqlTableMapping tableMapping, @NonNull @NonNull SqlTableMetadata tableMetadata) Validates a table definition based onPersistentEntity
mapping against its actual corresponding metadata from the database.- Parameters:
tableMapping
- The SQL table mapping fromPersistentEntity
to validatetableMetadata
- The SQL table metadata from the database to compare against- Throws:
SchemaValidationException
- When expected column not found or is not matching expected type
-
getSupportedDialect
Returns the SQL dialect supported by this validator.- Returns:
- the supported SQL dialect, never null
-