First of all I have to state that I am not a SQL professional so I may
be asking the silliest thing in the world, but you never learn if you
dont ask. Right?

To the point: I use the sqlite database in some C++ object that receives
sql commands from the LAN and executes them. I am trying to create a
kind of poor-man's observer pattern where the SQL object would send
information of changed data to all the subscribers who listen that
particular information (i.e. a single database row). Each row will have
an unique id. So basically I need to extend the functionality so that
during each UPDATE command I need to get (at least) the unique id of the
row that was changed. Surely this is common operation for SQL users?

Should I use triggers? But they seem limited as the only allow the
execution of SQL statements.. so I could have a separate table where
I'd collect the changed information and process the table after the
UPDATE. That sounds kludgey.

Or I could create a new function for SQL that I could use with the
UPDATE command? Sounds tedious.

And what about VIEWS? ... Perhaps not what I'd need.

I'd really appreciate any kind of ideas you might have. Currently I just
don't know what ( / where) to look for ( / at).

I am using SQLite 2.8.14 and gcc 3.3.3.

Thanks!

--
Rami Saarinen

Reply via email to