001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2009-2009 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.spi.impl; 011 012import java.sql.Connection; 013import java.sql.SQLException; 014import java.util.List; 015 016/** 017 * Implementation of {@link mondrian.spi.Dialect} for the Neoview database. 018 * 019 * @author jhyde 020 * @since Dec 4, 2009 021 */ 022public class NeoviewDialect extends JdbcDialectImpl { 023 024 public static final JdbcDialectFactory FACTORY = 025 new JdbcDialectFactory( 026 NeoviewDialect.class, 027 DatabaseProduct.NEOVIEW); 028 029 /** 030 * Creates a NeoviewDialect. 031 * 032 * @param connection Connection 033 */ 034 public NeoviewDialect(Connection connection) throws SQLException { 035 super(connection); 036 } 037 038 public boolean _supportsOrderByNullsLast() { 039 return true; 040 } 041 042 public boolean requiresOrderByAlias() { 043 return true; 044 } 045 046 public boolean requiresAliasForFromQuery() { 047 return true; 048 } 049 050 public boolean allowsDdl() { 051 // We get the following error in the test environment. It might be a bit 052 // pessimistic to say DDL is never allowed. 053 // 054 // ERROR[1116] The current partitioning scheme requires a user-specified 055 // clustering key on object NEO.PENTAHO."foo" 056 return false; 057 } 058 059 public boolean supportsGroupByExpressions() { 060 return false; 061 } 062 063 public String generateInline( 064 List<String> columnNames, 065 List<String> columnTypes, 066 List<String[]> valueList) 067 { 068 return generateInlineForAnsi( 069 "t", columnNames, columnTypes, valueList, true); 070 } 071} 072 073// End NeoviewDialect.java