001package io.ebean.config.dbplatform.sqlserver; 002 003import io.ebean.config.dbplatform.DbStandardHistorySupport; 004 005/** 006 * History support only valid on SqlServer 2016 or later. 007 * 008 * @author Vilmos Nagy 009 */ 010public class SqlServerHistorySupport extends DbStandardHistorySupport { 011 012 /** 013 * Return the ' as of timestamp ?' clause appended after the table name. 014 */ 015 @Override 016 public String getAsOfViewSuffix(String asOfViewSuffix) { 017 return " for system_time as of ?"; 018 } 019 020 @Override 021 public String getVersionsBetweenSuffix(String asOfViewSuffix) { 022 return " for system_time between ? and ?"; 023 } 024 025 /** 026 * Returns the SQL Server specific effective start column. 027 */ 028 @Override 029 public String getSysPeriodLower(String tableAlias, String sysPeriod) { 030 return tableAlias + "." + sysPeriod + "From"; 031 } 032 033 /** 034 * Returns the SQL Server specific effective end column. 035 */ 036 @Override 037 public String getSysPeriodUpper(String tableAlias, String sysPeriod) { 038 return tableAlias + "." + sysPeriod + "To"; 039 } 040}