Welcome Guest, Not a member yet? Register   Sign In
CI4 Database Pessimistic Locking Row
#1

Does codeigniter 4 database library will have pessimistic locking feature like laravel eloquent does, https://laravel.com/docs/5.4/queries#pes...ic-locking
Keep calm.
Reply
#2

Do you know what a pessimistic lock is in the first place, or are you just asking just because Laravel?
Reply
#3

(This post was last modified: 03-23-2017, 10:06 AM by arma7x.)

(03-23-2017, 05:00 AM)Narf Wrote: Do you know what a pessimistic lock is in the first place, or are you just asking just because Laravel?

Yes, i know it. Just like how CI lock session row in database until finish updating it. And I want to lock the row until finished with it.
Keep calm.
Reply
#4

Well, if you know what you want to do with it - fair enough.

Though, I asked more about the "pessimistic" part, as a) pretty much nobody uses that term in PHPland; and b) it is wrongly described in the Laravel manual you linked to - a shared lock is not pessimistic.
Reply
#5

(03-23-2017, 11:43 AM)Narf Wrote: Well, if you know what you want to do with it - fair enough.

Though, I asked more about the "pessimistic" part, as a) pretty much nobody uses that term in PHPland; and b) it is wrongly described in the Laravel manual you linked to - a shared lock is not pessimistic.

Not sharedlock() but lockforupdate() as mention in laravel eloquent, "Prevent the rows from being modified or from being selected with another shared lock".
Keep calm.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB