MCPcopy Index your code
hub / github.com/ent/ent / ForShare

Method ForShare

dialect/sql/builder.go:2378–2380  ·  view source on GitHub ↗

ForShare sets the lock configuration for suffixing the `SELECT` statement with the `FOR SHARE` clause.

(opts ...LockOption)

Source from the content-addressed store, hash-verified

2376// ForShare sets the lock configuration for suffixing the
2377// `SELECT` statement with the `FOR SHARE` clause.
2378func (s *Selector) ForShare(opts ...LockOption) *Selector {
2379 return s.For(LockShare, opts...)
2380}
2381
2382// ForUpdate sets the lock configuration for suffixing the
2383// `SELECT` statement with the `FOR UPDATE` clause.

Callers 1

TestSelectWithLockFunction · 0.45

Calls 1

ForMethod · 0.95

Tested by 1

TestSelectWithLockFunction · 0.36