hasValueConstraint returns true if one or more constraints that check an attribute's value are set.
()
| 1664 | |
| 1665 | // hasValueConstraint returns true if one or more constraints that check an attribute's value are set. |
| 1666 | func (c *PermanodeConstraint) hasValueConstraint() bool { |
| 1667 | // If a field has been added or removed, update this after adding the new field to the return statement if necessary. |
| 1668 | const expectedFields = 15 |
| 1669 | if numPermanodeFields != expectedFields { |
| 1670 | panic(fmt.Sprintf("PermanodeConstraint field count changed (now %v rather than %v)", numPermanodeFields, expectedFields)) |
| 1671 | } |
| 1672 | return c.Value != "" || |
| 1673 | c.ValueMatches != nil || |
| 1674 | c.ValueMatchesInt != nil || |
| 1675 | c.ValueMatchesFloat != nil || |
| 1676 | c.ValueInSet != nil |
| 1677 | } |
| 1678 | |
| 1679 | func (c *PermanodeConstraint) blobMatches(ctx context.Context, s *search, br blob.Ref, bm camtypes.BlobMeta) (ok bool, err error) { |
| 1680 | if bm.CamliType != schema.TypePermanode { |
no outgoing calls
no test coverage detected