Class PostgresHistorySupport

  • All Implemented Interfaces:
    io.ebean.config.dbplatform.DbHistorySupport

    public class PostgresHistorySupport
    extends io.ebean.config.dbplatform.DbViewHistorySupport
    Postgres support for history features.
    • Method Detail

      • getBindCount

        public int getBindCount()
        Return 1 as we are using the postgres range type and hence don't need 2 bind variables.
        Specified by:
        getBindCount in interface io.ebean.config.dbplatform.DbHistorySupport
        Overrides:
        getBindCount in class io.ebean.config.dbplatform.DbViewHistorySupport
      • getAsOfPredicate

        public String getAsOfPredicate​(String asOfTableAlias,
                                       String asOfSysPeriod)
        Build and return the 'as of' predicate for a given table alias.

        Each @History entity involved in the query has this predicate added using the related table alias.

        Specified by:
        getAsOfPredicate in interface io.ebean.config.dbplatform.DbHistorySupport
        Overrides:
        getAsOfPredicate in class io.ebean.config.dbplatform.DbViewHistorySupport
        Parameters:
        asOfTableAlias - The table alias this predicate is added for
        asOfSysPeriod - 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

        public String getSysPeriodLower​(String tableAlias,
                                        String sysPeriod)
        Description copied from class: io.ebean.config.dbplatform.DbViewHistorySupport
        Return the lower bound column prepended with the table alias.
        Specified by:
        getSysPeriodLower in interface io.ebean.config.dbplatform.DbHistorySupport
        Overrides:
        getSysPeriodLower in class io.ebean.config.dbplatform.DbViewHistorySupport
        Parameters:
        tableAlias - the table alias
        sysPeriod - the name of the sys_period column
      • getSysPeriodUpper

        public String getSysPeriodUpper​(String tableAlias,
                                        String sysPeriod)
        Description copied from class: io.ebean.config.dbplatform.DbViewHistorySupport
        Return the upper bound column prepended with the table alias.
        Specified by:
        getSysPeriodUpper in interface io.ebean.config.dbplatform.DbHistorySupport
        Overrides:
        getSysPeriodUpper in class io.ebean.config.dbplatform.DbViewHistorySupport
        Parameters:
        tableAlias - the table alias
        sysPeriod - the name of the sys_period column