MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / ForShare

Method ForShare

ent/gitcommit_query.go:548–556  ·  view source on GitHub ↗

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

(opts ...sql.LockOption)

Source from the content-addressed store, hash-verified

546// on any rows that are read. Other sessions can read the rows, but cannot modify them
547// until your transaction commits.
548func (gcq *GitCommitQuery) ForShare(opts ...sql.LockOption) *GitCommitQuery {
549 if gcq.driver.Dialect() == dialect.Postgres {
550 gcq.Unique(false)
551 }
552 gcq.modifiers = append(gcq.modifiers, func(s *sql.Selector) {
553 s.ForShare(opts...)
554 })
555 return gcq
556}
557
558// Modify adds a query modifier for attaching custom logic to queries.
559func (gcq *GitCommitQuery) Modify(modifiers ...func(s *sql.Selector)) *GitCommitSelect {

Callers

nothing calls this directly

Calls 2

UniqueMethod · 0.95
DialectMethod · 0.80

Tested by

no test coverage detected