use of mondrian.spi.impl.MonetDbDialect in project mondrian by pentaho.
the class DialectTest method testMonetBooleanColumn.
public void testMonetBooleanColumn() throws SQLException {
ResultSetMetaData resultSet = new MockResultSetMetadata().withColumnType(Types.BOOLEAN).build();
MonetDbDialect monetDbDialect = new MonetDbDialect();
SqlStatement.Type type = monetDbDialect.getType(resultSet, 0);
assertEquals(SqlStatement.Type.OBJECT, type);
}
use of mondrian.spi.impl.MonetDbDialect in project mondrian by pentaho.
the class DialectTest method testMonetDBTypeMapQuirks.
public void testMonetDBTypeMapQuirks() throws SQLException {
MockResultSetMetadata mockResultSetMeta = new MockResultSetMetadata();
Dialect monetDbDialect = TestContext.getFakeDialect(Dialect.DatabaseProduct.MONETDB);
assertTrue("MonetDB dialect NUMERIC with precision =0, scale = 0" + " may be an aggregated decimal, should assume DOUBLE", monetDbDialect.getType(mockResultSetMeta.withColumnType(Types.NUMERIC).withPrecision(0).withScale(0).build(), 0) == SqlStatement.Type.DOUBLE);
}
Aggregations