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 String
getAsOfPredicate(String asOfTableAlias, String asOfSysPeriod)
Build and return the 'as of' predicate for a given table alias.int
getBindCount()
Return 1 as we are using the postgres range type and hence don't need 2 bind variables.String
getSysPeriodLower(String tableAlias, String sysPeriod)
Return the lower bound column prepended with the table alias.String
getSysPeriodUpper(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:
getBindCount
in interfaceDbHistorySupport
- Overrides:
getBindCount
in 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:
getAsOfPredicate
in interfaceDbHistorySupport
- Overrides:
getAsOfPredicate
in 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:DbViewHistorySupport
Return the lower bound column prepended with the table alias.- Specified by:
getSysPeriodLower
in interfaceDbHistorySupport
- Overrides:
getSysPeriodLower
in 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:DbViewHistorySupport
Return the upper bound column prepended with the table alias.- Specified by:
getSysPeriodUpper
in interfaceDbHistorySupport
- Overrides:
getSysPeriodUpper
in classDbViewHistorySupport
- Parameters:
tableAlias
- the table aliassysPeriod
- the name of the sys_period column
-
-