diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-03-24 09:04:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-24 09:04:57 +0000 |
| commit | 79622cf698a1c831341f6e3906005ddbb54c55d8 (patch) | |
| tree | 275a44d7d719bedfd8ecd43e7dec40a6e93fb2ed /atuin-client/src/database.rs | |
| parent | Bump debian from bullseye-20230227-slim to bullseye-20230320-slim (#802) (diff) | |
| download | atuin-79622cf698a1c831341f6e3906005ddbb54c55d8.zip | |
Delete all instances of a command (#797)
* Delete all instances of a command
Our search command will de-dupe results by default. But... This isn't
great for deleting! You don't want to run it over-and-over-and-over
until all commands are deleted.
Loop the query, and keep on deleting what it returns until they are all
gone.
* Optimize delete upload
It was running a request for every element, on every sync lol
Only push a delete if needed
Future: push all deletes in one request
Diffstat (limited to 'atuin-client/src/database.rs')
| -rw-r--r-- | atuin-client/src/database.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index 4135646c..bb4d9dfa 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -460,6 +460,7 @@ impl Database for Sqlite { ]) .group_by("command") .group_by("exit") + .and_where("deleted_at is null") .order_desc("timestamp"); let query = query.sql().expect("bug in list query. please report"); |
