Page 1 of 1

$OCSSWROOT/bin/seadasutils/ancDB.py

Posted: Fri Jul 05, 2024 2:18 pm America/New_York
by oo_processing
Dear Support,

The function delete_record doesn't work as expected, probably because it's not extensively tested.
The current V2024.0, from line 134

Code: Select all

        
        else:
            satid = self.check_file(filename, starttime=starttime)
            ancids = conn.execute('select ancid from satancinfo where satid = ?', [satid])
            for a in ancids:
                c.execute('DELETE from satancinfo where ancid = ?', [a[0]])
                c.execute('DELETE from ancfiles where ancid = ?', [a[0]])
Using ancid as key to delete records in tables satancinfo and ancfiles would delete records needed by other satid. Therefore my suggestion is

Code: Select all

        else:
            satid = self.check_file(filename, starttime=starttime)
            c.execute('DELETE from satancinfo where satid = ?', [satid])
            c.execute('DELETE from satfiles where satid = ?', [satid])
Thanks,
Yuyuan

Re: $OCSSWROOT/bin/seadasutils/ancDB.py

Posted: Tue Sep 17, 2024 11:14 am America/New_York
by OB SeaDAS - xuanyang02
Thanks, Yuyuan for your suggestion! We'll test your code and adopt it accordingly.

Re: $OCSSWROOT/bin/seadasutils/ancDB.py

Posted: Wed Mar 26, 2025 7:10 pm America/New_York
by oo_processing
Excited to see the new code implemented in tag V2025.1

Cheers!
Yuyuan