public Object getArrayImpl(long index, int count, Map<String, Class<?>> map) throws SQLException { // for now maps aren't supported. if (map != null && !map.isEmpty()) { throw org.postgresql.Driver.notImplemented(this.getClass(), "getArrayImpl(long,int,Map)"); } // array index is out of range if (index < 1) { throw new PSQLException(GT.tr("The array index is out of range: {0}", index), PSQLState.DATA_ERROR); } if (fieldBytes != null) { return readBinaryArray((int) index, count); } if (fieldString == null) { return null; } buildArrayList(); if (count == 0) { count = arrayList.size(); } // array index out of range if ((--index) + count > arrayList.size()) { throw new PSQLException( GT.tr("The array index is out of range: {0}, number of elements: {1}.", index + count, (long) arrayList.size()), PSQLState.DATA_ERROR); } return buildArray(arrayList, (int) index, count); }
: (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : BooleanTypeUtil.castToBoolean((String) o)); } else { pa[length++] = o == null ? false : BooleanTypeUtil.castToBoolean((String) o); : (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : PgResultSet.toShort((String) o)); } else { pa[length++] = o == null ? 0 : PgResultSet.toShort((String) o); : (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : PgResultSet.toInt((String) o)); } else { pa[length++] = o == null ? 0 : PgResultSet.toInt((String) o); : (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : PgResultSet.toLong((String) o)); } else { pa[length++] = o == null ? 0L : PgResultSet.toLong((String) o); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : PgResultSet.toBigDecimal((String) v)); : (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : PgResultSet.toFloat((String) o)); } else { pa[length++] = o == null ? 0f : PgResultSet.toFloat((String) o); : (dims > 1 ? buildArray((PgArrayList) o, 0, -1) : PgResultSet.toDouble((String) o)); } else { pa[length++] = o == null ? 0d : PgResultSet.toDouble((String) o); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : v;