Я пытаюсь получить ответ из базы данных ODBC postgresql при выполнении простого
DELETE * from some_table
со следующим кодом, я не могу получить классический ответ DELETE 1
?affected_row_count
было моим предположением, но, похоже, не is_affected_row_count_supported
.У меня такая же проблема со вставками ...
delete_entity (a_primary_key: INTEGER_64)
-- Delete from given primary_key object
require
valid_db_connection: attached db_connection.base_update
and attached db_connection.session_control
local
l_void: like item
do
if attached db_connection.base_update as l_base_update
and then attached db_connection.session_control as l_session_control then
l_base_update.modify (delete_from_primary_key_query(a_primary_key))
if l_base_update.is_ok then
last_success_message := "Entity with ID " + a_primary_key.out + " deleted from DB successfully"
if l_base_update.is_affected_row_count_supported then
check
only_one_affected_row: l_base_update.affected_row_count = 1
end
if attached last_success_message as l then
l.append (" affected rows:" + l_base_update.affected_row_count.out )
end
end
if attached last_success_message as l then logger.write_information (l) end
else
create {INSERT_ERROR} last_error.make ("last delete did not work: " + l_base_update.error_message_32)
end
end
end