Thinking through how to protect integrity of rows in an "optimistic 
locking" scenario, I can't see a way around either

- comparing all original data values on posting an updated record to see 
if the underlying record had been altered after being read
- comparing original record generation counter to current record 
generation counter upon posting

and if either test fails, then returning a conflict error.

I prefer the record generation counter comparison.

But I'm working in PHP. What would be the most efficient way of 
implementing a record generation counter comparison (and auto-increment) 
on posting an updated record?

Thanks,

- Henrik

-- 

Henrik Bechmann
bechmann.ca

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

Reply via email to