Sunday, June 29, 2014

Re: database table locking across supported database

Hi,

On Sun, Jun 29, 2014 at 8:45 PM, John Andersen <j.andersen.lv@gmail.com> wrote:
>
> Put a unique index on your receipt_number column, then when you
> grab the highest receipt_number, increases it and saves it, you will either
> succeed or get an error.

Thats one way of doing it.

But I have faced this issues at few other places also. For eg : I want
to read a huge number of rows from table 'x' and I want to do some
calculations on it and then save the result in the table 'y'. Now I
dont want anyone else to add or remove removes from the table 'x'
until I have finished writing the result to table 'y'.

Having support for locking will really help and make it easier for me
do deal with the concurrency issues.

Regards.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: