GSAK (Geocaching Swiss Army Knife)
The MacroDelete command now somewhat supersedes the Delete command and also enables you to delete records from the logs, waypoints, corrected and attributes 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 - Complete all flagged deletes. Note: Commit here relates specifically to this command only. That is, the physical update of the database is not actaully done until the current transaction (if there is one) is commited.
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
Note1: 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.
Note2: when deleting logs, you should always follow up with the ResyncLogs command to make sure all log totals are correctly recalculated.
Also see the Delete command
Alpha List Category List
Copyright 2004-2013 CWE Computer Services |