Example usage for java.sql Connection createStruct

List of usage examples for java.sql Connection createStruct

Introduction

In this page you can find the example usage for java.sql Connection createStruct.

Prototype

Struct createStruct(String typeName, Object[] attributes) throws SQLException;

Source Link

Document

Factory method for creating Struct objects.

Usage

From source file:com.adaptris.jdbc.connection.FailoverDatasourceTest.java

@Test
public void testTypes() throws Exception {
    Connection conn = new MyProxy();

    try {/*ww w.  j  a  v  a 2  s  .  c  om*/
        try {
            conn.createBlob();
        } catch (Exception e) {

        }
        try {
            conn.createClob();
        } catch (Exception e) {

        }
        try {
            conn.createNClob();
        } catch (Exception e) {

        }
        try {
            conn.createSQLXML();
        } catch (Exception e) {

        }
        try {
            conn.createStruct("java.lang.String", new String[] { "hello"

            });
        } catch (Exception e) {
        }
        try {
            conn.createArrayOf("java.lang.String", new String[] { "hello", "world" });
        } catch (Exception e) {
        }
    } finally {
        JdbcUtil.closeQuietly(conn);
    }
}