Here you can find the source of getDriverSpecificSettings(Connection connection, String defaultUnionColumnValue)
public static void getDriverSpecificSettings(Connection connection, String defaultUnionColumnValue) throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { public static void getDriverSpecificSettings(Connection connection, String defaultUnionColumnValue) throws SQLException { /*/*from www. j a v a 2 s . com*/ * Check the type of database that we running the SQL against - this * dictates the value we will use for defaulting columns in the "union" * that are not specified in the "xmlselect"... */ if (connection != null) { DatabaseMetaData metadata = connection.getMetaData(); String dbproduct = metadata.getDatabaseProductName(); int dbmajorversion = metadata.getDriverMajorVersion(); int dbminorversion = metadata.getDriverMinorVersion(); defaultUnionColumnValue = "null"; if (dbproduct.startsWith("Microsoft SQL Server")) { defaultUnionColumnValue = "null"; } if (dbproduct.startsWith("MySQL") && dbmajorversion >= 5) { defaultUnionColumnValue = "null"; } //log.debug("Database: " + dbproduct + ", version " + dbmajorversion + "." + dbminorversion); } } }