Examples of createArrayOf()


Examples of java.sql.Connection.createArrayOf()

      String[] strArr = new String[4];
      strArr[0] = "ABC";
      strArr[1] = "CEDF";
      strArr[2] = "XYZWER";
      strArr[3] = "AB";
      Array array = conn.createArrayOf("VARCHAR", strArr);
      statement.setArray(2, array);
      ResultSet rs = statement.executeQuery();
      assertTrue(rs.next());
      // Need to support primitive
      Double[] doubleArr = new Double[4];
View Full Code Here

Examples of java.sql.Connection.createArrayOf()

        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
        conn = DriverManager.getConnection(getUrl(), props);
        stmt = conn.prepareStatement("UPSERT INTO t VALUES(?,?)");
        stmt.setString(1, "a");
        Long[] s = new Long[] { 1l, 2l };
        Array array = conn.createArrayOf("BIGINT", s);
        stmt.setArray(2, array);
        stmt.execute();
        conn.commit();
        conn.close();
        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 40));
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.