Examples of nativeSQL()


Examples of com.alibaba.druid.pool.DruidPooledConnection.nativeSQL()

        Assert.assertEquals(false, conn.isWrapperFor(null));
        Assert.assertEquals(true, conn.isWrapperFor(DruidPooledConnection.class));
        Assert.assertEquals(true, conn.isWrapperFor(Connection.class));

        Assert.assertEquals("SELECT 1", conn.nativeSQL("SELECT 1"));

        conn.toString();

        conn.close();
        conn.toString();
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

  {
    final ISession session = _panel.getSession();
    final Connection conn = session.getSQLConnection().getConnection();
    try
    {
      final String sql = conn.nativeSQL(_panel.getSQLScriptToBeExecuted());
      if (sql.length() > 0)
      {
        _panel.appendSQLScript("\n" + sql, true);
      }
    }
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        try {
            conn.nativeSQL("CREATE TABLE TAB1(COL1 INT NOT NULL)");
            fail("SQLException of 08003 should be thrown!");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        try {
            conn.nativeSQL("CREATE TABLE TAB1(COL1 INT NOT NULL)");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

    Connection tzConn = null;
   
    try {
      String escapeToken = "SELECT {ts '2002-11-12 10:00:00'} {t '05:11:02'}";
      tzConn = getConnectionWithProps(props);
      assertTrue(!tzConn.nativeSQL(escapeToken).equals(this.conn.nativeSQL(escapeToken)));
    } finally {
      if (tzConn != null) {
        tzConn.close();
      }
    }
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

      assertEquals(expected, output);

      output = conn_legacy.nativeSQL(input);
      assertEquals(expected, output);

      output = conn_legacy_tz.nativeSQL(input);
      assertEquals(expected, output);

    } finally {
      if (conn_nolegacy != null) {
        conn_nolegacy.close();
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        try {
            conn.nativeSQL("CREATE TABLE TAB1(COL1 INT NOT NULL)");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

          "'"+tagDetails.getId()+"', " +
          "'"+tagDetails.getName()+"'," +
          "'"+tagDetails.getDescription()+"'," +
          "'"+tagDetails.getRegion().getId()+"')";
      logger.debug("sql=" + sql);
      logger.debug("native sql=" + connection.nativeSQL(sql));
      s.executeUpdate(sql);
      connection.close();
    }
      catch (SQLException e) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        try {
            conn.nativeSQL("CREATE TABLE TAB1(COL1 INT NOT NULL)");
            fail("SQLException of 08003 should be thrown!");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
View Full Code Here

Examples of java.sql.Connection.nativeSQL()

    Connection tzConn = null;
   
    try {
      String escapeToken = "SELECT {ts '2002-11-12 10:00:00'} {t '05:11:02'}";
      tzConn = getConnectionWithProps(props);
      assertTrue(!tzConn.nativeSQL(escapeToken).equals(this.conn.nativeSQL(escapeToken)));
    } finally {
      if (tzConn != null) {
        tzConn.close();
      }
    }
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.