Examples of Jdbc4Array


Examples of org.postgresql.jdbc4.Jdbc4Array

            } else if (obj instanceof PGobject) {
                final PGobject pgObj = (PGobject) obj;
                node = new ObjectResultNode(pgObj.getValue(), name, pgObj.getType(), typeId,
                        pgSet.getStatement().getConnection());
            } else if (obj instanceof Jdbc4Array) {
                final Jdbc4Array arrayObj = (Jdbc4Array) obj;

                // TODO pribeiro jdbc driver lacks support for arrays of user defined types. We should whether
                // implement the missing feature in driver or use the current approach (parse string).
                final String typeName = arrayObj.getBaseTypeName();
                final String value = arrayObj.toString();
                node = new ArrayResultNode(name, value, typeName, typeId, pgSet.getStatement().getConnection());
            } else {
                node = new SimpleResultNode(obj, name);
            }
View Full Code Here

Examples of org.postgresql.jdbc4.Jdbc4Array

        else {
            final String valueStr = value.asString().toString();
            if ( sqlType != null ) {
                if ( rawArrayType == Boolean.TRUE && sqlType.getByteList().endsWith( ARRAY_END ) ) {
                    final int oid = oid(context, column);
                    final Array valueArr = new Jdbc4Array(connection.unwrap(BaseConnection.class), oid, valueStr);
                    statement.setArray(index, valueArr); return;
                }
                if ( sqlType.getByteList().startsWith( INTERVAL ) ) {
                    statement.setObject( index, new PGInterval( valueStr ) ); return;
                }
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.