[yunqa.de] Re: REPLICATION

  • From: "Jerry Hayes" <jhayes@xxxxxxxxxxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Thu, 19 Jun 2008 09:30:37 -0400

Ralf (et al),

 

Do you know when the “sqlite3_update_hook” fires in regard to transactions?
I’m *assuming* that the callback is fired after the transactional context is
resolved and thus only affects committed records.

 

I’m rolling an audit trail as well, and will use the update hook for the
same thing, possibly only writing out:

Tablename, RowID, DateTime, Action (Update/Delete/Insert)

 

   _____  

From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On
Behalf Of Jerry Hayes
Sent: Wednesday, June 18, 2008 3:48 PM
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] REPLICATION

 

If I wanted to roll replication on changes, I’m guessing I would use the:

 

 “sqlite3_update_hook” 

 

which would give me the table, record and operation?

 

>From there I can write out to a replication table that keeps the changed
record data (encoded in blob field, xml or something) along with table name
and rowid.  The replication end-point would be responsible for grabbing the
replication record, recording it in its own tables and then deleting the
replication record.

 

Since the hook works on all tables in the database, it seems pretty
straightforward.

 

Comments welcomed ;)

 

Jerry

 

 

 


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.3.0/1505 - Release Date: 6/16/2008
7:20 AM



No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.4.0/1507 - Release Date: 6/18/2008
7:09 AM



No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.4.0/1507 - Release Date: 6/18/2008
7:09 AM
 

Other related posts: