Package org.sonar.core.persistence.dialect

Examples of org.sonar.core.persistence.dialect.Dialect


    assertThat(FakeMigration.executed).isTrue();
  }

  @Test
  public void should_create_schema_on_h2() throws Exception {
    Dialect supportedDialect = new H2();
    when(dbClient.database().getDialect()).thenReturn(supportedDialect);
    Connection connection = mock(Connection.class);
    DbSession session = mock(DbSession.class);
    when(session.getConnection()).thenReturn(connection);
    when(dbClient.openSession(false)).thenReturn(session);
View Full Code Here


    Configuration conf = new Configuration();
    conf.setEnvironment(new Environment("production", createTransactionFactory(), database.getDataSource()));
    conf.setUseGeneratedKeys(true);
    conf.setLazyLoadingEnabled(false);
    conf.setJdbcTypeForNull(JdbcType.NULL);
    Dialect dialect = database.getDialect();
    conf.setDatabaseId(dialect.getId());
    conf.getVariables().setProperty("_true", dialect.getTrueSqlValue());
    conf.getVariables().setProperty("_false", dialect.getFalseSqlValue());
    conf.getVariables().setProperty("_scrollFetchSize", String.valueOf(dialect.getScrollDefaultFetchSize()));

    loadAlias(conf, "ActiveDashboard", ActiveDashboardDto.class);
    loadAlias(conf, "Author", AuthorDto.class);
    loadAlias(conf, "Component", ComponentDto.class);
    loadAlias(conf, "Dashboard", DashboardDto.class);
View Full Code Here

TOP

Related Classes of org.sonar.core.persistence.dialect.Dialect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.