Name

delete_gc — Delete a follow's group composition data

Synopsis

BOOLEAN delete_gc ( followdate,  
  chimpid);  
DATE followdate ;
VARCHAR(5) chimpid ;
 
BOOLEAN delete_gc ( followid);  
INT followid ;
 

Input

The follow for which group composition should be deleted may be designated either by supplying the date and mother of the follow or by supplying the id of the follow.

followdate

The date of the follow for which group composition should be deleted.

chimpid

The CHIMPIDS.ChimpID of the mother in the follow for which group composition should be deleted.

followid

The FOLLOWS.FollowID of the follow for which group composition should be deleted.

Description

delete_gc deletes all of a follow's related group composition information -- the related rows in RAW_GROUPS, RAW_GROUPMEMBERS, GROUPS, and GROUPMEMBERS are deleted.

Note

This function orders the deletes in such a way that performance may be improved by orders of magnitude. It is therefore the preferred way to delete group composition.

This function returns TRUE if the supplied follow exists and group comp rows are deleted and FALSE otherwise.

The following example demonstrates how to delete all of the automatically generated group compositions.

Example 6.1. Deleting Automatically Generated Group Compositions

SELECT delete_gc(follows.followid)
  FROM follows
  WHERE EXISTS (SELECT 1
                  FROM intervals
                         JOIN sheets
                              ON (sheets.sheetid = intervals.sheetid)
                         JOIN fieldfollows
                              ON (fieldfollows.ffid = sheets.ffid)
                      WHERE intervals.followid = follows.followid
                            AND fieldfollows.gcstatus = 'A');



Page generated: 2018-08-25T22:19:28-04:00.