Interface SqlTypeMappingRule

All Known Implementing Classes:
SqlTypeAssignmentRule, SqlTypeCoercionRule

public interface SqlTypeMappingRule
Interface that defines rules within type mappings.

Each instance should define a type mapping matrix which actually defines the rules that indicate whether one type can apply the rule to another.

Typically, the "rule" can be type assignment or type coercion.

  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns whether it is valid to apply the defined rules from type from to type to.
    Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>>
    Returns the type mappings of this rule instance.
  • Method Details

    • getTypeMapping

      Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> getTypeMapping()
      Returns the type mappings of this rule instance.

      The mappings should be immutable.

    • canApplyFrom

      default boolean canApplyFrom(SqlTypeName to, SqlTypeName from)
      Returns whether it is valid to apply the defined rules from type from to type to.