> Thank you.
> 
> I missed the EXCLUSIVE clause in the docs....  comes with the newbie 
> territory, 
> i guess.
> 
> So to confirm, would something like this work?
> 
> Tables:
> task_log => (id, task_data, time_stamp)
> task_fifo = > (id, fk_task_log)
> task_status_log => (id, fk_task_log, status_code, time_stamp)
> 
> And in psudo SQL:  
> 
> TRIGGER ON INSERT INTO task_log:
> BEGIN
>     INSERT INTO task_fifo (fk_task_log) VALUES (NEW.id)
> END;
> 
> 
> And then, again in psudo SQL, the worker does something like:
> 
> BEGIN EXCLUSIVE TRANSACTION;
> INSERT INTO task_status_log  FROM SELECT OLDEST IN task_fifo ;
> DELETE FROM task_fifo  OLDEST; 
> COMMIT;
> 
> Is there a better way to do this?  (views?)
> 

OK, wait..... I certainly am missing something here.

At this point, how do I now retrieve the id & task_data for the task?

(Yet another newbie question....)

Thanks



      

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to