Class AbstractDialect

    • Constructor Detail

      • AbstractDialect

        public AbstractDialect()
    • Method Detail

      • validate

        public void validate​(org.apache.flink.table.types.logical.RowType rowType)
                      throws org.apache.flink.table.api.ValidationException
        Description copied from interface: JdbcDialect
        Check if this dialect instance support a specific data type in table schema.
        Specified by:
        validate in interface JdbcDialect
        Parameters:
        rowType - the physical table datatype of a row in the database table.
        Throws:
        org.apache.flink.table.api.ValidationException - in case of the table schema contains unsupported type.
      • getInsertIntoStatement

        public String getInsertIntoStatement​(String tableName,
                                             String[] fieldNames)
        A simple INSERT INTO statement.
        
         INSERT INTO table_name (column_name [, ...])
         VALUES (value [, ...])
         
        Specified by:
        getInsertIntoStatement in interface JdbcDialect
        Returns:
        the dialects INSERT INTO statement.
      • getUpdateStatement

        public String getUpdateStatement​(String tableName,
                                         String[] fieldNames,
                                         String[] conditionFields)
        A simple single row UPDATE statement.
        
         UPDATE table_name
         SET col = val [, ...]
         WHERE cond [AND ...]
         
        Specified by:
        getUpdateStatement in interface JdbcDialect
        Returns:
        A single row update statement.
      • getDeleteStatement

        public String getDeleteStatement​(String tableName,
                                         String[] conditionFields)
        A simple single row DELETE statement.
        
         DELETE FROM table_name
         WHERE cond [AND ...]
         
        Specified by:
        getDeleteStatement in interface JdbcDialect
        Returns:
        A single row delete statement.
      • getSelectFromStatement

        public String getSelectFromStatement​(String tableName,
                                             String[] selectFields,
                                             String[] conditionFields)
        A simple SELECT statement.
        
         SELECT expression [, ...]
         FROM table_name
         WHERE cond [AND ...]
         
        Specified by:
        getSelectFromStatement in interface JdbcDialect
        Returns:
        A select statement.
      • getRowExistsStatement

        public String getRowExistsStatement​(String tableName,
                                            String[] conditionFields)
        A simple SELECT statement that checks for the existence of a single row.
        
         SELECT 1
         FROM table_name
         WHERE cond [AND ...]
         
        Specified by:
        getRowExistsStatement in interface JdbcDialect
      • timestampPrecisionRange

        public Optional<AbstractDialect.Range> timestampPrecisionRange()
        Returns:
        The inclusive range [min,max] of supported precisions for TimestampType columns. None if timestamp type is not supported.
      • decimalPrecisionRange

        public Optional<AbstractDialect.Range> decimalPrecisionRange()
        Returns:
        The inclusive range [min,max] of supported precisions for DecimalType columns. None if decimal type is not supported.
      • supportedTypes

        public abstract Set<org.apache.flink.table.types.logical.LogicalTypeRoot> supportedTypes()
        Defines the set of supported types for the dialect. If the dialect supports DECIMAL or TIMESTAMP types, be sure to override decimalPrecisionRange() and timestampPrecisionRange() respectively.
        Returns:
        a set of logical type roots.