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