Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match before Insert and Delete queries and confirm #166

Open
flyingsilverfin opened this issue Aug 2, 2021 · 1 comment
Open

Match before Insert and Delete queries and confirm #166

flyingsilverfin opened this issue Aug 2, 2021 · 1 comment

Comments

@flyingsilverfin
Copy link
Member

The UX of a match-insert and match-delete can be improved by telling the user whether any concepts were inserted or deleted, rather than just writing The concepts have been deleted. and The concepts have been inserted.

We decided to implement this in a slightly different approach, given a match-insert and match-delete, we will:

  1. run the match portion with a limit 20;
  2. if no answers are matched, tell the user
  3. if some answers are matched, confirm with the user that 5 [10/15/20/20+] answers are going to be deleted (y/n):

this will not only tell the user approximately how many answers will be deleted, but also ensure they confirm the delete.

We should do something similar for insert, for symmetry.

Discussion: is the performance impact important? We should not use this approach for file-based loading, as this is one way to load a larger number of inserts.

@alexjpwalker
Copy link
Member

This is fairly involved with the current Console architecture, so we're going to hold off on this until the Console rewrite, and implement a simpler version:

Note: we do already print out the number of concepts inserted with a match-insert or insert.

alexjpwalker added a commit that referenced this issue Nov 2, 2021
## What is the goal of this PR?

We've added an indicator for uncommitted changes within a transaction. While you are in a transaction that has uncommitted changes, an asterisk (*) will now be displayed in the prompt.

Also, concept deletion is now more transparent; the number of concepts being deleted (or updated) is printed to the console now. This is particularly helpful for catching when there is a bug in the match query that might cause it to delete no concepts, or the wrong concepts.

## What are the changes implemented in this PR?

- Indicate uncommitted changes
- Print the number of concepts that are being deleted (or updated)

We chose to not add a confirmation prompt prior to deletion just yet, this is due to Console architecture making that too difficult for now. This is (still!) tracked in:
- #166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants