001package io.ebean.config.dbplatform.sqlserver;
002
003import io.ebean.annotation.Platform;
004import io.ebean.config.dbplatform.DbPlatformType;
005import io.ebean.config.dbplatform.DbType;
006import io.ebean.config.dbplatform.IdType;
007
008/**
009 * Microsoft SQL Server platform that has non-UTF8 types (char, varchar, text) and default to Identity rather than Sequence.
010 */
011public class SqlServer16Platform extends SqlServerBasePlatform {
012
013  public SqlServer16Platform() {
014    super();
015    this.platform = Platform.SQLSERVER16;
016    // default to use Identity rather than sequences
017    this.dbIdentity.setIdType(IdType.IDENTITY);
018
019    // non-utf8 column types
020    dbTypeMap.put(DbType.CHAR, new DbPlatformType("char", 1));
021    dbTypeMap.put(DbType.VARCHAR, new DbPlatformType("varchar", 255));
022    dbTypeMap.put(DbType.LONGVARCHAR, new DbPlatformType("text"));
023    dbTypeMap.put(DbType.CLOB, new DbPlatformType("text"));
024  }
025
026}