gd_markfordeletion

Marks data for deletion from the archive.

 

Syntax 

marktotal = gd_markfordeletion(ID)

marktotal = gd_markfordeletion(IDs)

 

Description

marktotal = gd_markfordeletion(ID) takes an ID string and marks the corresponding file, variable or datagroup for deletion from the archive. The function returns 1 if successful or 0 if failed, in which case the reason is displayed in a warning message (for example the ID does not exist). Once data is marked for deletion it is no longer visible using gd_query, gd_retrieve or any other Database Toolbox functions (apart from gd_unmarkfordeletion or gd_querydeleted). The data is then eligible for permanent deletion by an administrator.

 

marktotal = gd_markfordeletion(IDs) is similar but takes a cell of ID strings and marks the corresponding files, variables and datagroups for deletion from the archive. The function returns marktotal, the total number of IDs successfully marked for deletion, and displays warning messages for those that were unsuccessful.

 

Examples

Mark a single file for deletion from the archive.

 

ID = gd_archive('C:\file.dat');

marktotal = gd_markfordeletion(ID)

 

marktotal =

     1

 

Query variable metadata, and then mark the corresponding variables for deletion from the archive.

 

q = 'standard.archiveDate > 2004-12-01 & a.b < -500';

qresults = gd_query(q, 'varmeta');

for i=1:size(qresults,2)

    IDs{i} = qresults{i}.standard.ID;

end

marktotal = gd_markfordeletion(IDs)

 

marktotal =

     5

 

Notes

Only the owner of the data (the person who archived it) can mark it for deletion.

 

A valid proxy certificate is required (see gd_createproxy from the Geodise Compute Toolbox).

 

See also

gd_unmarkfordeletion, gd_querydeleted, gd_createproxy

 



gd_display

contents

gd_query

Copyright © 2007, The Geodise Project, University of Southampton