MCPcopy
hub / github.com/ent/ent / ForUpdate

Method ForUpdate

dialect/sql/builder.go:2384–2386  ·  view source on GitHub ↗

ForUpdate sets the lock configuration for suffixing the `SELECT` statement with the `FOR UPDATE` clause.

(opts ...LockOption)

Source from the content-addressed store, hash-verified

2382// ForUpdate sets the lock configuration for suffixing the
2383// `SELECT` statement with the `FOR UPDATE` clause.
2384func (s *Selector) ForUpdate(opts ...LockOption) *Selector {
2385 return s.For(LockUpdate, opts...)
2386}
2387
2388// Clone returns a duplicate of the selector, including all associated steps. It can be
2389// used to prepare common SELECT statements and use them differently after the clone is made.

Callers 2

TestSelectWithLockFunction · 0.45
TestQueryNodesFunction · 0.45

Calls 1

ForMethod · 0.95

Tested by 2

TestSelectWithLockFunction · 0.36
TestQueryNodesFunction · 0.36