return; arrayList = new PgArrayList(); PgArrayList a = new PgArrayList(); PgArrayList p = ((PgArrayList) dims.lastElement()); p.add(a); dims.add(a); curArray.add(!wasInsideString && haveMinServer82 && b.equals("NULL") ? null : b);
count = input.size(); Object o = input.get(index++); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : AbstractJdbc2ResultSet.toBigDecimal((String) v, -1)); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : v; Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toDate(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTime(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTimestamp(null, (String) v));
count = input.size(); Object o = input.get(index++); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : AbstractJdbc2ResultSet.toBigDecimal((String) v, -1)); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : v; Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toDate(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTime(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTimestamp(null, (String) v));
count = input.size(); Object o = input.get(index++); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : AbstractJdbc2ResultSet.toBigDecimal((String) v, -1)); Object o = input.get(index++); Object o = input.get(index++); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : v; Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toDate(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTime(null, (String) v)); Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTimestamp(null, (String) v));
return; arrayList = new PgArrayList(); PgArrayList a = new PgArrayList(); PgArrayList p = ((PgArrayList) dims.lastElement()); p.add(a); dims.add(a); curArray.add(!wasInsideString && haveMinServer82 && b.equals("NULL") ? null : b);
return; arrayList = new PgArrayList(); PgArrayList a = new PgArrayList(); PgArrayList p = ((PgArrayList) dims.lastElement()); p.add(a); dims.add(a); curArray.add(!wasInsideString && haveMinServer82 && b.equals("NULL") ? null : b);
count = arrayList.size(); if ((--index) + count > arrayList.size()) throw new PSQLException(GT.tr("The array index is out of range: {0}, number of elements: {1}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); String v = (String) arrayList.get(offset); t[0] = connection.encodeString(Integer.toString(offset + 1)); t[1] = v == null ? null : connection.encodeString(v); Object v = arrayList.get(offset);
count = arrayList.size(); if ((--index) + count > arrayList.size()) throw new PSQLException(GT.tr("The array index is out of range: {0}, number of elements: {1}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); String v = (String) arrayList.get(offset); t[0] = connection.encodeString(Integer.toString(offset + 1)); t[1] = v == null ? null : connection.encodeString(v); Object v = arrayList.get(offset);
public Object getArrayImpl(long index, int count, Map 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}", new Long(index)), PSQLState.DATA_ERROR); } 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}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); } return buildArray(arrayList, (int) index, count); }
public Object getArrayImpl(long index, int count, Map 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}", new Long(index)), PSQLState.DATA_ERROR); } 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}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); } return buildArray(arrayList, (int) index, count); }
/** * Convert array list to PG String representation (e.g. {0,1,2}). */ private String toString(PgArrayList list) throws SQLException { StringBuffer b = new StringBuffer().append('{'); char delim = connection.getTypeInfo().getArrayDelimiter(oid); for (int i = 0; i < list.size(); i++) { Object v = list.get(i); if (i > 0) b.append(delim); if (v == null) b.append("NULL"); else if (v instanceof PgArrayList) b.append(toString((PgArrayList) v)); else escapeArrayElement(b, (String)v); } b.append('}'); return b.toString(); }
/** * Convert array list to PG String representation (e.g. {0,1,2}). */ private String toString(PgArrayList list) throws SQLException { StringBuffer b = new StringBuffer().append('{'); char delim = connection.getTypeInfo().getArrayDelimiter(oid); for (int i = 0; i < list.size(); i++) { Object v = list.get(i); if (i > 0) b.append(delim); if (v == null) b.append("NULL"); else if (v instanceof PgArrayList) b.append(toString((PgArrayList) v)); else escapeArrayElement(b, (String)v); } b.append('}'); return b.toString(); }
count = arrayList.size(); if ((--index) + count > arrayList.size()) throw new PSQLException(GT.tr("The array index is out of range: {0}, number of elements: {1}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); String v = (String) arrayList.get(offset); t[0] = connection.encodeString(Integer.toString(offset + 1)); t[1] = v == null ? null : connection.encodeString(v); Object v = arrayList.get(offset);
public Object getArrayImpl(long index, int count, Map 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}", new Long(index)), PSQLState.DATA_ERROR); } 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}.", new Object[] { new Long(index + count), new Long(arrayList.size()) }), PSQLState.DATA_ERROR); } return buildArray(arrayList, (int) index, count); }
/** * Convert array list to PG String representation (e.g. {0,1,2}). */ private String toString(PgArrayList list) throws SQLException { StringBuffer b = new StringBuffer().append('{'); char delim = connection.getTypeInfo().getArrayDelimiter(oid); for (int i = 0; i < list.size(); i++) { Object v = list.get(i); if (i > 0) b.append(delim); if (v == null) b.append("NULL"); else if (v instanceof PgArrayList) b.append(toString((PgArrayList) v)); else escapeArrayElement(b, (String)v); } b.append('}'); return b.toString(); }