Interface AggregateSupport

All Known Implementing Classes:
AggregateSupportImpl, DB2AggregateSupport, OracleAggregateSupport, PostgreSQLAggregateSupport

@Incubating public interface AggregateSupport
A set of operations providing support for aggregate column types in a certain SQL dialect.
Since:
6.2
  • Method Details

    • aggregateComponentCustomReadExpression

      String aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
      Returns the custom read expression to use for column. Replaces the given placeholder in the given template by the custom read expression to use for column.
      Parameters:
      template - The custom read expression template of the column
      placeholder - The placeholder to replace with the actual read expression
      aggregateParentReadExpression - The expression to the aggregate column, which contains the column
      columnExpression - The column within the aggregate type, for which to return the read expression
      aggregateColumn - The type information for the aggregate column
      column - The column within the aggregate type, for which to return the read expression
    • aggregateComponentAssignmentExpression

      String aggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
      Returns the assignment expression to use for column, which is part of the aggregate type of aggregatePath.
      Parameters:
      aggregateParentAssignmentExpression - The expression to the aggregate column, which contains the column
      columnExpression - The column within the aggregate type, for which to return the assignment expression
      aggregateColumn - The type information for the aggregate column
      column - The column within the aggregate type, for which to return the assignment expression
    • aggregateCustomWriteExpression

      String aggregateCustomWriteExpression(AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
      Returns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.
      Parameters:
      aggregateColumn - The type information for the aggregate column
      aggregatedColumns - The columns of the aggregate type
    • requiresAggregateCustomWriteExpressionRenderer

      boolean requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)
      Whether aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration) is needed when assigning an expression to individual aggregated columns in an update statement.
    • preferSelectAggregateMapping

      boolean preferSelectAggregateMapping(int aggregateSqlTypeCode)
      Whether to prefer selecting the aggregate column as a whole instead of individual parts.
    • preferBindAggregateMapping

      boolean preferBindAggregateMapping(int aggregateSqlTypeCode)
      Whether to prefer binding the aggregate column as a whole instead of individual parts.
    • aggregateCustomWriteExpressionRenderer

      AggregateSupport.WriteExpressionRenderer aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)
      Parameters:
      aggregateColumn - The mapping of the aggregate column
      columnsToUpdate - The mappings of the columns that should be updated
      typeConfiguration - The type configuration
    • aggregateAuxiliaryDatabaseObjects

      List<AuxiliaryDatabaseObject> aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
      Allows to generate auxiliary database objects for an aggregate type.
    • aggregateComponentSqlTypeCode

      int aggregateComponentSqlTypeCode(int aggregateColumnSqlTypeCode, int columnSqlTypeCode)
      Returns the SqlTypes type code to use for the given column type code, when aggregated within a column of the given aggregate column type code. Allows to change types when a database does not allow to use certain types within an aggregate type, like DB2 doesn't allow the use of boolean within an object/struct type.
      Parameters:
      aggregateColumnSqlTypeCode - The SqlTypes type code of the aggregate column
      columnSqlTypeCode - The SqlTypes type code of the column
    • supportsComponentCheckConstraints

      boolean supportsComponentCheckConstraints()
      Returns whether the database supports the use of a check constraint on tables, to implement not-null and other constraints of an aggregate type.