|
GSAK (Geocaching Swiss Army Knife)
| ||||
|
MacroDelete Action=DelCurrent|DelScope|Commit First some background. Deleting records in the GSAK database is something of an "Achilles' heel", because they need to be physically purged from the file. You will notice that if you delete just a single cache in a large database the process is quite long. The GSAK database engine does actually allow you to do a "soft" delete where the record is hidden. However, when deletes were implemented this way it had a dramatic effect that slowed down all filters. To make sure filters are optimised and run at top speed, all deletes must physically remove the records from the database. Prior to version 7.2 you could only delete caches from the database via the Delete command. The MacroDelete command now somewhat supersedes the Delete command and also enables you to delete records from the logs and waypoints tables As the physical deleting of records is the "slow" part, this command is broken into two phases: 1. The flagging of records to delete (actions DelCurrent and DelScope) 2. The actual delete of those flagged records (action Commit) This enables you to quickly flag records to delete, then finally do the physical delete to remove them when you are ready. This command works on your currently active table, and "Action" has 3 possible values: DelCurrent - Flag the current record for delete DelScope - Flag all the records in the current scope for delete Commit - Commit all flagged deletes and purge from the database As the "Caches" table does not really have a "scope" the use of DelScope when "Caches" is the active table, allows you to delete all records in your current subset/filter Example 1 - Delete all child waypoints for the current cache
Example 2 - Delete all child waypoints for a filter. In this example we use a Mfilter just for caches with "river" in the name
Example 3 - Delete all child waypoints in the current database:
Example 4 - Delete all Parking waypoints
Note: When you use the actions DelScope or DelCurrent, you are only flagging the record for delete in memory. The actual delete is not performed until you issue a Commit for the corresponding table. If you end your macro without doing a Commit, your flagged deletes will be cleared from memory and lost - effectively changing nothing in your database. For those familiar with database languages, consider this a type of "transaction" where the changes are all (commit used) or nothing (no commit) You can use the commit action anytime before the macro ends to complete the transaction. If you have uncommitted deletes for the caches table and another table(s), make sure you do the commit for the other tables first. That is, when doing deletes to multiple tables, always issue the commit for the caches table last (the order between logs and waypoints does not matter) Like the Delete command, the MacroDelete command also cascades deletes when you commit deletes to the caches table. That is, when a cache is removed from the database, all corresponding waypoints and logs are also removed. Also see the Delete command Summary |
|
Copyright 2004-2008 CWE Computer Services Privacy Policy Contact |