6061626364656667686970
rs1.getInt(1); rs2.getInt(1); } rs2.close(); // verify the temp table is not deleted yet rs1.beforeFirst(); for (int i = 0; i < 20; i++) { rs1.next(); rs1.getInt(1); } rs1.close();
104105106107108109110111112113114
156157158159160161162163164165166
rs.updateInt(1, 10); rs.updateRow(); rs.next(); rs.updateString(2, "Welt"); rs.updateRow(); rs.beforeFirst(); rs.next(); assertEquals(10, rs.getInt(1)); assertEquals("Hello", rs.getString(2)); rs.next(); assertEquals(2, rs.getInt(1));
489490491492493494495496497498499
for (int i = 0; i < rows; i++) { rs.next(); assertState(rs, rows == 0, i == 0, i == rows - 1, rows == 0 || i == rows); } try { rs.beforeFirst(); assertState(rs, rows > 0, false, false, false); } catch (SQLException e) { if (!error) { throw e; }
417418419420421422423424425426427
break; } case Value.RESULT_SET: { try { ResultSet rs = ((ValueResultSet) v).getResultSet(); rs.beforeFirst(); ResultSetMetaData meta = rs.getMetaData(); int columnCount = meta.getColumnCount(); writeInt(columnCount); for (int i = 0; i < columnCount; i++) { writeString(meta.getColumnName(i + 1));
643644645646647648649650651652653
} case Value.RESULT_SET: { writeByte((byte) type); try { ResultSet rs = ((ValueResultSet) v).getResultSet(); rs.beforeFirst(); ResultSetMetaData meta = rs.getMetaData(); int columnCount = meta.getColumnCount(); writeVarInt(columnCount); for (int i = 0; i < columnCount; i++) { writeString(meta.getColumnName(i + 1));
662663664665666667668669670671672
Value val = DataType.readValue(null, rs, i + 1, t); writeValue(val); } } writeByte((byte) 0); rs.beforeFirst(); } catch (SQLException e) { throw DbException.convert(e); } break; }
10471048104910501051105210531054105510561057
} case Value.RESULT_SET: { int len = 1; try { ResultSet rs = ((ValueResultSet) v).getResultSet(); rs.beforeFirst(); ResultSetMetaData meta = rs.getMetaData(); int columnCount = meta.getColumnCount(); len += getVarIntLen(columnCount); for (int i = 0; i < columnCount; i++) { len += getStringLen(meta.getColumnName(i + 1));
10661067106810691070107110721073107410751076
Value val = DataType.readValue(null, rs, i + 1, t); len += getValueLen(val, handler); } } len++; rs.beforeFirst(); } catch (SQLException e) { throw DbException.convert(e); } return len; }
436437438439440441442443444445446
Value val = DataType.readValue(session, rs, i + 1, t); writeValue(val); } } writeBoolean(false); rs.beforeFirst(); } catch (SQLException e) { throw DbException.convertToIOException(e); } break; }