Class PostgresHistorySupport
- java.lang.Object
-
- io.ebean.config.dbplatform.DbViewHistorySupport
-
- io.ebean.config.dbplatform.postgres.PostgresHistorySupport
-
- All Implemented Interfaces:
DbHistorySupport
public class PostgresHistorySupport extends DbViewHistorySupport
Postgres support for history features.
-
-
Constructor Summary
Constructors Constructor Description PostgresHistorySupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAsOfPredicate(String asOfTableAlias, String asOfSysPeriod)Build and return the 'as of' predicate for a given table alias.intgetBindCount()Return 1 as we are using the postgres range type and hence don't need 2 bind variables.StringgetSysPeriodLower(String tableAlias, String sysPeriod)Return the lower bound column prepended with the table alias.StringgetSysPeriodUpper(String tableAlias, String sysPeriod)Return the upper bound column prepended with the table alias.-
Methods inherited from class io.ebean.config.dbplatform.DbViewHistorySupport
getAsOfViewSuffix, getVersionsBetweenSuffix, isStandardsBased
-
-
-
-
Constructor Detail
-
PostgresHistorySupport
public PostgresHistorySupport()
-
-
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:
getBindCountin interfaceDbHistorySupport- Overrides:
getBindCountin classDbViewHistorySupport
-
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:
getAsOfPredicatein interfaceDbHistorySupport- Overrides:
getAsOfPredicatein classDbViewHistorySupport- Parameters:
asOfTableAlias- The table alias this predicate is added forasOfSysPeriod- 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:DbViewHistorySupportReturn the lower bound column prepended with the table alias.- Specified by:
getSysPeriodLowerin interfaceDbHistorySupport- Overrides:
getSysPeriodLowerin classDbViewHistorySupport- Parameters:
tableAlias- the table aliassysPeriod- the name of the sys_period column
-
getSysPeriodUpper
public String getSysPeriodUpper(String tableAlias, String sysPeriod)
Description copied from class:DbViewHistorySupportReturn the upper bound column prepended with the table alias.- Specified by:
getSysPeriodUpperin interfaceDbHistorySupport- Overrides:
getSysPeriodUpperin classDbViewHistorySupport- Parameters:
tableAlias- the table aliassysPeriod- the name of the sys_period column
-
-