Package mondrian.spi

Class DialectManager

    • Method Detail

      • register

        public static void register​(DialectFactory factory)
        Registers a DialectFactory.
        Parameters:
        factory - Dialect factory
      • register

        public static void register​(Class<? extends Dialect> dialectClass)
        Registers a Dialect class.
        Parameters:
        dialectClass - Dialect class
      • createDialect

        public static Dialect createDialect​(DataSource dataSource,
                                            Connection connection)
        Creates a Dialect from a JDBC connection.

        If the dialect cannot handle this connection, throws. Never returns null.

        Parameters:
        dataSource - Data source
        connection - JDBC connection
        Returns:
        dialect for this connection
        Throws:
        RuntimeException - if underlying systems give an error, or if cannot create dialect
      • createDialect

        public static Dialect createDialect​(DataSource dataSource,
                                            Connection connection,
                                            String dialectClassName)
        Creates a Dialect from a JDBC connection, optionally specifying the name of the dialect class.

        If the dialect cannot handle this connection, throws. Never returns null.

        Parameters:
        dataSource - Data source
        connection - JDBC connection
        dialectClassName - Name of class that implements Dialect, or null
        Returns:
        dialect for this connection
        Throws:
        RuntimeException - if underlying systems give an error, or if cannot create dialect