[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] deleted-flag in PDB todo
- To: coldsync <coldsync-hackers at lusars dot net>
- Subject: Re: [coldsync-hackers] deleted-flag in PDB todo
- From: Andrew Arensburger <arensb+CShackers at ooblick dot com>
- Date: Mon, 11 Nov 2002 16:31:34 -0500 (EST)
- In-Reply-To: <courier.3DD00B9B.0000065D@stmichel.theinternet.de>
- Reply-To: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
On Mon, 11 Nov 2002, Peer Oliver Schmidt wrote:
> I am finally able to add record to my Palm and have them copy over
>>to my SQL system. However, if I delete a record on the Palm, I neve
>>r get the deleted flag. Shouldn't this excerpt detect if the record
>> is deleted?
>
> sub DoDump {
>
> foreach $record (@{$PDB->{"records"}}) {
> if ($record->{deleted}) {
> print "Record deleted";
> } else {
> print "Record NOT deleted";
> }
> }
> }
Not in a Dump conduit, no.
The generic conduit (which is a Sync conduit) compares the record
on the Palm and on the desktop. If it sees that the record on the Palm has
been marked "deleted", then it makes a copy of the record in the archive
file, but then it deletes the record from both the Palm and the desktop.
Dump conduits run after Sync conduits, so by the time your Dump
conduit runs, any deleted records have been removed from the .pdb file.
If you want to use a Dump conduit, you'll need to compare the
contents of the SQL database and the .pdb file. If your SQL database
stores the Palm record ID, then you can just iterate over all the SQL
records, and if there's no matching record in the .pdb file, then delete
the SQL record.
Alternately, you can write a Sync conduit, but the logic for that
is significantly harder than for Fetch or Dump conduits.
--
Andrew Arensburger Actually, these _do_ represent the
arensb@ooblick.com opinions of ooblick.com!
Generic Tagline V 6.01
--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.