Interface DbHistorySupport

    • Method Detail

      • isStandardsBased

        boolean isStandardsBased()
        Return true if the implementation is SQL2011 standards based.

        Non standards based means we need to add additional predicates into the JOIN ON clause and add an additional predicate for the base table.

      • getBindCount

        int getBindCount()
        Return the number of columns bound in a 'As Of' predicate.

        This is 1 for more standard sql2011 style and Postgres which has the special range type and 2 for view based solutions with 2 columns such as MySql.

      • getAsOfViewSuffix

        String getAsOfViewSuffix​(String asOfViewSuffix)
        For sql2011 style this ignores the passed in view suffix and returns something like the ' as of timestamp ?' clause to be appended after the base table name.
        Parameters:
        asOfViewSuffix - the configured view suffix (typically "_with_history").
        Returns:
        The suffix appended after the base table name in the from and join clauses.
      • getAsOfPredicate

        String getAsOfPredicate​(String tableAlias,
                                String sysPeriod)
        Return the 'as of' predicate added for the given table alias.
        Parameters:
        tableAlias - The table alias this predicate is added for
        sysPeriod - The name of the 'sys_period' column used for effective date time range.
        Returns:
        The predicate containing a single ? bind parameter which will be bound to the 'as at' timestamp value
      • getSysPeriodLower

        String getSysPeriodLower​(String tableAlias,
                                 String sysPeriod)
        Return the column for the system period lower bound that will be included in findVersions() queries.
        Parameters:
        tableAlias - the table alias which will typically be 't0'
        sysPeriod - the name of the sys_period column
      • getSysPeriodUpper

        String getSysPeriodUpper​(String tableAlias,
                                 String sysPeriod)
        Return the column for the system period upper bound that will be included in findVersions() queries.
        Parameters:
        tableAlias - the table alias which will typically be 't0'
        sysPeriod - the name of the sys_period column