Обсуждение: resultset.getXXX methods return current row even if on insert row

Поиск
Список
Период
Сортировка

resultset.getXXX methods return current row even if on insert row

От
"John T. Dow"
Дата:
According to the documentationfor JDBC, you can use the getter methods on the insert row. But the postgres
implementationof JDBC always returns values from the current row. 

John

PS: JDBC does not seem to have a way of asking the driver whether it's on the insert row.

I suppose you could call relative(0). If it's on the insert row it will throw an exception. If not on the insert row,
thenrelative(0) should not throw an exception but it shouldn't do anything else either. Is there a better way?