Add support for editing of resultsets in the Query Tool, if the data can be identified as updatable. Fixes #1760

When a query is run in the Query Tool, check if the source of the columns
can be identified as being from a single table, and that we have all
columns that make up the primary key. If so, consider the resultset to
be editable and allow the user to edit data and add/remove rows in the
grid. Changes to data are saved using SAVEPOINTs as part of any
transaction that's in progress, and rolled back if there are integrity
violations, without otherwise affecting the ongoing transaction.

Implemented by Yosry Muhammad as a Google Summer of Code project.
This commit is contained in:
Yosry Muhammad
2019-07-17 11:45:20 +01:00
committed by Dave Page
parent beb06a4c76
commit 710d520631
38 changed files with 1868 additions and 605 deletions

View File

@@ -45,6 +45,9 @@ class StartRunningQuery:
if type(session_obj) is Response:
return session_obj
# Remove any existing primary keys in session_obj
session_obj.pop('primary_keys', None)
transaction_object = pickle.loads(session_obj['command_obj'])
can_edit = False
can_filter = False