/** * Return the predicate appended to the end of the query. * <p> * Note used for Oracle total recall etc with the more standard approach. */ String getAsOfPredicate(String tableAlias) { return dbHistorySupport.getAsOfPredicate(tableAlias, sysPeriod); }
/** * Return the lower bound column. */ String getSysPeriodLower(String tableAlias) { return dbHistorySupport.getSysPeriodLower(tableAlias, sysPeriod); }
/** * Return the upper bound column. */ String getSysPeriodUpper(String tableAlias) { return dbHistorySupport.getSysPeriodUpper(tableAlias, sysPeriod); }
/** * For 'As Of' queries return the number of bind variables per predicate. */ private Binder getBinder(TypeManager typeManager, DatabasePlatform databasePlatform, DataTimeZone dataTimeZone) { DbExpressionHandler jsonHandler = getDbExpressionHandler(databasePlatform); DbHistorySupport historySupport = databasePlatform.getHistorySupport(); if (historySupport == null) { return new Binder(typeManager, 0, false, jsonHandler, dataTimeZone); } return new Binder(typeManager, historySupport.getBindCount(), historySupport.isStandardsBased(), jsonHandler, dataTimeZone); }
/** * Return true if the underlying history support is standards based. */ boolean isStandardsBased() { return dbHistorySupport.isStandardsBased(); }
/** * Return the AsOfViewSuffix based on the DbHistorySupport. */ private String getAsOfViewSuffix(DatabasePlatform databasePlatform, ServerConfig serverConfig) { DbHistorySupport historySupport = databasePlatform.getHistorySupport(); // with historySupport returns a simple view suffix or the sql2011 as of timestamp suffix return (historySupport == null) ? serverConfig.getAsOfViewSuffix() : historySupport.getAsOfViewSuffix(serverConfig.getAsOfViewSuffix()); }
/** * Return the versions between timestamp suffix based on the DbHistorySupport. */ private String getVersionsBetweenSuffix(DatabasePlatform databasePlatform, ServerConfig serverConfig) { DbHistorySupport historySupport = databasePlatform.getHistorySupport(); // with historySupport returns a simple view suffix or the sql2011 versions between timestamp suffix return (historySupport == null) ? serverConfig.getAsOfViewSuffix() : historySupport.getVersionsBetweenSuffix(serverConfig.getAsOfViewSuffix()); }