All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeaninternal.server.expression.platform.DbExpressionHandlerFactory Maven / Gradle / Ivy

package io.ebeaninternal.server.expression.platform;

import io.ebean.annotation.Platform;
import io.ebean.config.dbplatform.DatabasePlatform;


public class DbExpressionHandlerFactory {

  /**
   * Create and return the appropriate platform specific handing of expressions.
   */
  public static DbExpressionHandler from(DatabasePlatform databasePlatform) {

    Platform platform = databasePlatform.getPlatform();
    switch (platform) {
      case H2:
        return new H2DbExpression();
      case POSTGRES:
        return new PostgresDbExpression();
      case MYSQL:
        return new MySqlDbExpression();
      case ORACLE:
        return new OracleDbExpression();
      case SQLSERVER16:
      case SQLSERVER17:
      case SQLSERVER:
        return new SqlServerDbExpression();
      case HANA:
        return new HanaDbExpression();
      default:
        return new BasicDbExpression();
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy