Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

没有 lock for update ? #79

Closed
yangyuclub opened this issue Jul 1, 2019 · 1 comment
Closed

没有 lock for update ? #79

yangyuclub opened this issue Jul 1, 2019 · 1 comment

Comments

@yangyuclub
Copy link
Contributor

No description provided.

@fizzday
Copy link
Member

fizzday commented Jul 3, 2019

@yangyuclub 最新的 rc7 版本, 添加了

        // 悲观锁使用
	// sharedLock(lock in share mode) 不会阻塞其它事务读取被锁定行记录的值
	SharedLock() *Orm
	// 此外你还可以使用 lockForUpdate 方法。“for update”锁避免选择行被其它共享锁修改或删除:
	// 会阻塞其他锁定性读对锁定行的读取(非锁定性读仍然可以读取这些记录,lock in share mode 和 for update 都是锁定性读)
	LockForUpdate() *Orm

@fizzday fizzday closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants