MCPcopy Create free account
hub / github.com/cloudwan/gohan / shouldJoin

Function shouldJoin

db/sql/sql.go:954–964  ·  view source on GitHub ↗
(policy schema.LockPolicy)

Source from the content-addressed store, hash-verified

952}
953
954func shouldJoin(policy schema.LockPolicy) bool {
955 switch policy {
956 case schema.LockRelatedResources:
957 return true
958 case schema.SkipRelatedResources:
959 return false
960 default:
961 log.Fatalf("Unknown lock policy %+v", policy)
962 panic("Unexpected locking policy")
963 }
964}
965
966func (tx *Transaction) LockList(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, pg *pagination.Paginator, lockPolicy schema.LockPolicy) (list []*schema.Resource, total uint64, err error) {
967 return tx.LockListContext(context.Background(), s, filter, options, pg, lockPolicy)

Callers 1

lockListContextHelperFunction · 0.85

Calls 1

FatalfMethod · 0.80

Tested by

no test coverage detected