Currently PostgreSQLExecutionContext.query does not have a way to know how many rows did that particular
query affected. The only way to get that information is to use PostgreSQLExecutionContext.execute.
Unfortunately execute uses slower, less efficient encoding to talk to the PostgreSQL
server and does not support all data types that query supports.
This allows you to use PostgreSQLExecutionContext.query for INSERT, UPDATE, DELETE statements
and get the affected row count.
Currently
PostgreSQLExecutionContext.query
does not have a way to know how many rows did that particular query affected. The only way to get that information is to usePostgreSQLExecutionContext.execute
.Unfortunately
execute
uses slower, less efficient encoding to talk to the PostgreSQL server and does not support all data types thatquery
supports.This allows you to use
PostgreSQLExecutionContext.query
for INSERT, UPDATE, DELETE statements and get the affected row count.