Examples of jdbcCompliant()


Examples of com.alibaba.druid.proxy.DruidDriver.jdbcCompliant()

        DruidDriver driverWrapper = (DruidDriver) driver;

        Assert.assertEquals(4, driverWrapper.getMajorVersion());
        Assert.assertEquals(0, driverWrapper.getMinorVersion());
        Assert.assertEquals(true, driverWrapper.jdbcCompliant());

        Assert.assertTrue(driverWrapper.getConnectCount() > 0);

        Assert.assertNotNull(DruidDriver.getInstance());
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

    private void testStatic() throws SQLException {
        Driver dr = org.h2.Driver.load();

        assertEquals(dr.getMajorVersion(), meta.getDriverMajorVersion());
        assertEquals(dr.getMinorVersion(), meta.getDriverMinorVersion());
        assertTrue(dr.jdbcCompliant());

        assertEquals(0, dr.getPropertyInfo(null, null).length);
        assertTrue(dr.connect("jdbc:test:false", null) == null);

        assertTrue(meta.getNumericFunctions().length() > 0);
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

        Properties props = new Properties();
        props.put("user", "testuser");
        props.put("password", "testpass");
        Connection conn = DriverManager.getConnection(defaultdburl, props);
        // Driver should be jdbc compliant.
        assertTrue(driver.jdbcCompliant());

        // compare driver.get*Version() with DatabaseMetadata.getDriver*Version.
        DatabaseMetaData dbmd = conn.getMetaData();

        assertEquals(dbmd.getDriverMajorVersion(), driver.getMajorVersion());
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

    Properties props = new Properties();
    props.put("user","testuser");
    props.put("password","testpass");
    Connection conn = DriverManager.getConnection(frameworkURL, props);
    DatabaseMetaData dbmd = conn.getMetaData();
    System.out.println("jdbcCompliant() = " +  driver.jdbcCompliant());
   
    // Just check versions against database metadata to avoid more master updates.
    // Metadata test prints the actual version.
   
    int majorVersion = driver.getMajorVersion();
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

                    final Class<? extends Driver> driverClass = classLoader.loadClass(driverClassName).asSubclass(Driver.class);
                    final Constructor<? extends Driver> constructor = driverClass.getConstructor();
                    final Driver driver = constructor.newInstance();
                    final int majorVersion = driver.getMajorVersion();
                    final int minorVersion = driver.getMinorVersion();
                    final boolean compliant = driver.jdbcCompliant();
                    if (compliant) {
                        log.infof("Deploying JDBC-compliant driver %s (version %d.%d)", driverClass,
                                Integer.valueOf(majorVersion), Integer.valueOf(minorVersion));
                    } else {
                        log.infof("Deploying non-JDBC-compliant driver %s (version %d.%d)", driverClass,
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

                    final Class<? extends Driver> driverClass = classLoader.loadClass(driverClassName).asSubclass(Driver.class);
                    final Constructor<? extends Driver> constructor = driverClass.getConstructor();
                    final Driver driver = constructor.newInstance();
                    final int majorVersion = driver.getMajorVersion();
                    final int minorVersion = driver.getMinorVersion();
                    final boolean compliant = driver.jdbcCompliant();
                    if (compliant) {
                        DEPLOYER_JDBC_LOGGER.deployingCompliantJdbcDriver(driverClass, Integer.valueOf(majorVersion),
                                Integer.valueOf(minorVersion));
                    } else {
                        DEPLOYER_JDBC_LOGGER.deployingNonCompliantJdbcDriver(driverClass, Integer.valueOf(majorVersion),
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

    for (Iterator<String> i = names.iterator(); i.hasNext();) {
      String name = i.next().toString();
      try {
        Driver driver = (Driver) Class.forName(name).newInstance();
        ColorBuffer msg = beeLine.getColorBuffer()
            .pad(driver.jdbcCompliant() ? "yes" : "no", 10)
            .pad(driver.getMajorVersion() + "."
                + driver.getMinorVersion(), 8)
            .append(name);
        if (driver.jdbcCompliant()) {
          beeLine.output(msg);
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

        ColorBuffer msg = beeLine.getColorBuffer()
            .pad(driver.jdbcCompliant() ? "yes" : "no", 10)
            .pad(driver.getMajorVersion() + "."
                + driver.getMinorVersion(), 8)
            .append(name);
        if (driver.jdbcCompliant()) {
          beeLine.output(msg);
        } else {
          beeLine.output(beeLine.getColorBuffer().red(msg.getMono()));
        }
      } catch (Throwable t) {
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

            } catch (Throwable e) {
                // Ignore exceptions as there's no requirement for
                // a JDBC driver class to have a public default constructor
            }
            if (instance != null) {
                if (instance.jdbcCompliant()) {
                  // JCR-3445 At the moment the PostgreSQL isn't compliant because it doesn't implement this method...                 
                    ds.setValidationQueryTimeout(3);
                }
            }
            ds.setDriverClassName(driverClass.getName());
View Full Code Here

Examples of java.sql.Driver.jdbcCompliant()

        Properties props = new Properties();
        props.put("user", "testuser");
        props.put("password", "testpass");
        Connection conn = DriverManager.getConnection(defaultdburl, props);
        // Driver should be jdbc compliant.
        assertTrue(driver.jdbcCompliant());

        // compare driver.get*Version() with DatabaseMetadata.getDriver*Version.
        DatabaseMetaData dbmd = conn.getMetaData();

        assertEquals(dbmd.getDriverMajorVersion(), driver.getMajorVersion());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.