/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(url, conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
/** * Attempt to create the dictionary from the given connection URL and * driver name, either or both of which may be null. If the dictionary * cannot be calculated, returns null. */ public static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props) { String dclass = dictionaryClassForString(getProtocol(url), conf); if (dclass == null) dclass = dictionaryClassForString(driver, conf); if (dclass == null) return null; return newDBDictionary(conf, dclass, props); }
conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getDatabaseProductName(), conf); if (dclass == null) dclass = dictionaryClassForString(getProtocol(meta.getURL()), conf); if (dclass != null && dclass.contains("MySQL")) { final String checkMariaDB = dictionaryClassForString(meta.getDatabaseProductVersion(), conf); if (checkMariaDB != null) { dclass = checkMariaDB;
conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getDatabaseProductName(), conf); if (dclass == null) dclass = dictionaryClassForString(getProtocol(meta.getURL()), conf); if (dclass != null && dclass.contains("MySQL")) { final String checkMariaDB = dictionaryClassForString(meta.getDatabaseProductVersion(), conf); if (checkMariaDB != null) { dclass = checkMariaDB;
/** * Create the dictionary using connection metadata to determine its type. */ public static DBDictionary newDBDictionary(JDBCConfiguration conf, DataSource ds, String props) { Connection conn = null; try { conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getURL(), conf); if (dclass == null) dclass = dictionaryClassForString (meta.getDatabaseProductName(), conf); if (dclass == null) dclass = DBDictionary.class.getName(); return newDBDictionary(conf, dclass, props, conn); } catch (SQLException se) { throw new StoreException(se).setFatal(true); } finally { if (conn != null) try { conn.close(); } catch (SQLException se) { } } }
conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getDatabaseProductName(), conf); if (dclass == null) dclass = dictionaryClassForString(getProtocol(meta.getURL()), conf); if (dclass != null && dclass.contains("MySQL")) { final String checkMariaDB = dictionaryClassForString(meta.getDatabaseProductVersion(), conf); if (checkMariaDB != null) { dclass = checkMariaDB;
conn = ds.getConnection(); DatabaseMetaData meta = conn.getMetaData(); String dclass = dictionaryClassForString(meta.getDatabaseProductName(), conf); if (dclass == null) dclass = dictionaryClassForString(getProtocol(meta.getURL()), conf); if (dclass != null && dclass.contains("MySQL")) { final String checkMariaDB = dictionaryClassForString(meta.getDatabaseProductVersion(), conf); if (checkMariaDB != null) { dclass = checkMariaDB;