lock (chain operation 14)
The Lock method is a locking mechanism for the database. If used when querying or performing operations:
Example
Db::name('user')->where('id',1)->lock(true)->find();
will automatically be used in the generated SQL Add FOR UPDATE or FOR UPDATE NOWAIT (Oracle database) at the end of the statement.
The lock method supports passing in strings for some special locking requirements, such as:
Db::name('user')->where('id',1)->lock('lock in share mode')->find();