Java Database Driver Name Get getTypes()

Here you can find the source of getTypes()

Description

get Types

License

Open Source License

Declaration

static String[][] getTypes() 

Method Source Code

//package com.java2s;

public class Main {
    private static final String[][] sJDBCTypes = {
            { "HSQL Database Engine In-Memory", "org.hsqldb_voltpatches.jdbcDriver", "jdbc:hsqldb:mem:." },
            { "HSQL Database Engine Standalone", "org.hsqldb_voltpatches.jdbcDriver",
                    "jdbc:hsqldb:file:\u00ABdatabase/path?\u00BB" },
            { "HSQL Database Engine Server", "org.hsqldb_voltpatches.jdbcDriver", "jdbc:hsqldb:hsql://localhost/" },
            { "HSQL Database Engine WebServer", "org.hsqldb_voltpatches.jdbcDriver",
                    "jdbc:hsqldb:http://\u00ABhostname/?\u00BB" },
            { "JDBC-ODBC Bridge from Sun", "sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:\u00ABdatabase?\u00BB" },
            { "Cloudscape RMI", "RmiJdbc.RJDriver",
                    "jdbc:rmi://\u00ABhost?\u00BB:1099/jdbc:cloudscape:" + "\u00ABdatabase?\u00BB;create=true" },
            { "IBM DB2", "COM.ibm.db2.jdbc.app.DB2Driver", "jdbc:db2:\u00ABdatabase?\u00BB" },
            { "IBM DB2 (thin)", "COM.ibm.db2.jdbc.net.DB2Driver",
                    "jdbc:db2://\u00ABhost?\u00BB:6789/\u00ABdatabase?\u00BB" },
            { "Informix", "com.informix.jdbc.IfxDriver",
                    "jdbc:informix-sqli://\u00ABhost?\u00BB:1533/\u00ABdatabase?\u00BB:"
                            + "INFORMIXSERVER=\u00ABserver?\u00BB" },
            { "InstantDb", "jdbc.idbDriver", "jdbc:idb:\u00ABdatabase?\u00BB.prp" },
            { "MySQL Connector/J", "com.mysql.jdbc.Driver",
                    "jdbc:mysql://\u00ABhost?\u00BB/\u00ABdatabase?\u00BB" },
            { "MM.MySQL", "org.gjt.mm.mysql.Driver", "jdbc:mysql://\u00ABhost?\u00BB/\u00ABdatabase?\u00BB" },
            { "Oracle", "oracle.jdbc.driver.OracleDriver", "jdbc:oracle:oci8:@\u00ABdatabase?\u00BB" },
            { "Oracle (thin)", "oracle.jdbc.driver.OracleDriver",
                    "jdbc:oracle:thin:@\u00ABhost?\u00BB:1521:\u00ABdatabase?\u00BB" },
            { "PointBase", "com.pointbase.jdbc.jdbcUniversalDriver",
                    "jdbc:pointbase://\u00ABhost?\u00BB/\u00ABdatabase?\u00BB" },
            { "PostgreSQL", "org.postgresql.Driver", "jdbc:postgresql://\u00ABhost?\u00BB/\u00ABdatabase?\u00BB" },
            { "PostgreSQL v6.5", "postgresql.Driver",
                    "jdbc:postgresql://\u00ABhost?\u00BB/\u00ABdatabase?\u00BB" } };

    static String[][] getTypes() {

        return sJDBCTypes;
        /*/*from w  w w .j a  va 2  s  . c om*/
            
            if (connTypes == null) {
            
            
        // Pluggable connection types:
        Vector plugTypes = new Vector();
            
        try {
        plugTypes = (Vector) Class.forName(
            System.getProperty(
                "org.hsqldb_voltpatches.util.ConnectionTypeClass")).newInstance();
        } catch (Exception e) {
        ;
        }
            
        connTypes =
        new String[(plugTypes.size() / 3) + sJDBCTypes.length][3];
            
        int i = 0;
            
        for (int j = 0; j < plugTypes.size(); i++) {
        connTypes[i]    = new String[3];
        connTypes[i][0] = plugTypes.elementAt(j++).toString();
        connTypes[i][1] = plugTypes.elementAt(j++).toString();
        connTypes[i][2] = plugTypes.elementAt(j++).toString();
        }
            
        for (int j = 0; j < sJDBCTypes.length; i++, j++) {
        connTypes[i]    = new String[3];
        connTypes[i][0] = sJDBCTypes[j][0];
        connTypes[i][1] = sJDBCTypes[j][1];
        connTypes[i][2] = sJDBCTypes[j][2];
        }
            }
            
            return (connTypes);
         */
    }
}

Related

  1. driverClass(String url)
  2. getDriver(String dbms)
  3. getDriverClassName(String driver)
  4. getDriverClassNameByJdbcUrl(String url)
  5. getDriverName(String dbType)