statement

package
v0.5.1-ci-fix-test9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the statement type in the database.
	Label = "statement"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldPredicate holds the string denoting the predicate field in the database.
	FieldPredicate = "predicate"
	// EdgeSubjects holds the string denoting the subjects edge name in mutations.
	EdgeSubjects = "subjects"
	// EdgePolicy holds the string denoting the policy edge name in mutations.
	EdgePolicy = "policy"
	// EdgeAttestationCollections holds the string denoting the attestation_collections edge name in mutations.
	EdgeAttestationCollections = "attestation_collections"
	// EdgeDsse holds the string denoting the dsse edge name in mutations.
	EdgeDsse = "dsse"
	// Table holds the table name of the statement in the database.
	Table = "statements"
	// SubjectsTable is the table that holds the subjects relation/edge.
	SubjectsTable = "subjects"
	// SubjectsInverseTable is the table name for the Subject entity.
	// It exists in this package in order to avoid circular dependency with the "subject" package.
	SubjectsInverseTable = "subjects"
	// SubjectsColumn is the table column denoting the subjects relation/edge.
	SubjectsColumn = "statement_subjects"
	// PolicyTable is the table that holds the policy relation/edge.
	PolicyTable = "attestation_policies"
	// PolicyInverseTable is the table name for the AttestationPolicy entity.
	// It exists in this package in order to avoid circular dependency with the "attestationpolicy" package.
	PolicyInverseTable = "attestation_policies"
	// PolicyColumn is the table column denoting the policy relation/edge.
	PolicyColumn = "statement_policy"
	// AttestationCollectionsTable is the table that holds the attestation_collections relation/edge.
	AttestationCollectionsTable = "attestation_collections"
	// AttestationCollectionsInverseTable is the table name for the AttestationCollection entity.
	// It exists in this package in order to avoid circular dependency with the "attestationcollection" package.
	AttestationCollectionsInverseTable = "attestation_collections"
	// AttestationCollectionsColumn is the table column denoting the attestation_collections relation/edge.
	AttestationCollectionsColumn = "statement_attestation_collections"
	// DsseTable is the table that holds the dsse relation/edge.
	DsseTable = "dsses"
	// DsseInverseTable is the table name for the Dsse entity.
	// It exists in this package in order to avoid circular dependency with the "dsse" package.
	DsseInverseTable = "dsses"
	// DsseColumn is the table column denoting the dsse relation/edge.
	DsseColumn = "dsse_statement"
)

Variables

View Source
var (
	// PredicateValidator is a validator for the "predicate" field. It is called by the builders before save.
	PredicateValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var Columns = []string{
	FieldID,
	FieldPredicate,
}

Columns holds all SQL columns for statement fields.

Functions

func And

func And(predicates ...predicate.Statement) predicate.Statement

And groups predicates with the AND operator between them.

func HasAttestationCollections

func HasAttestationCollections() predicate.Statement

HasAttestationCollections applies the HasEdge predicate on the "attestation_collections" edge.

func HasAttestationCollectionsWith

func HasAttestationCollectionsWith(preds ...predicate.AttestationCollection) predicate.Statement

HasAttestationCollectionsWith applies the HasEdge predicate on the "attestation_collections" edge with a given conditions (other predicates).

func HasDsse

func HasDsse() predicate.Statement

HasDsse applies the HasEdge predicate on the "dsse" edge.

func HasDsseWith

func HasDsseWith(preds ...predicate.Dsse) predicate.Statement

HasDsseWith applies the HasEdge predicate on the "dsse" edge with a given conditions (other predicates).

func HasPolicy added in v0.5.0

func HasPolicy() predicate.Statement

HasPolicy applies the HasEdge predicate on the "policy" edge.

func HasPolicyWith added in v0.5.0

func HasPolicyWith(preds ...predicate.AttestationPolicy) predicate.Statement

HasPolicyWith applies the HasEdge predicate on the "policy" edge with a given conditions (other predicates).

func HasSubjects

func HasSubjects() predicate.Statement

HasSubjects applies the HasEdge predicate on the "subjects" edge.

func HasSubjectsWith

func HasSubjectsWith(preds ...predicate.Subject) predicate.Statement

HasSubjectsWith applies the HasEdge predicate on the "subjects" edge with a given conditions (other predicates).

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Statement

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Statement

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Statement

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Statement

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Statement

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Statement

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Statement

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Statement

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Statement) predicate.Statement

Or groups predicates with the OR operator between them.

func Predicate

func Predicate(v string) predicate.Statement

Predicate applies equality check predicate on the "predicate" field. It's identical to PredicateEQ.

func PredicateContains

func PredicateContains(v string) predicate.Statement

PredicateContains applies the Contains predicate on the "predicate" field.

func PredicateContainsFold

func PredicateContainsFold(v string) predicate.Statement

PredicateContainsFold applies the ContainsFold predicate on the "predicate" field.

func PredicateEQ

func PredicateEQ(v string) predicate.Statement

PredicateEQ applies the EQ predicate on the "predicate" field.

func PredicateEqualFold

func PredicateEqualFold(v string) predicate.Statement

PredicateEqualFold applies the EqualFold predicate on the "predicate" field.

func PredicateGT

func PredicateGT(v string) predicate.Statement

PredicateGT applies the GT predicate on the "predicate" field.

func PredicateGTE

func PredicateGTE(v string) predicate.Statement

PredicateGTE applies the GTE predicate on the "predicate" field.

func PredicateHasPrefix

func PredicateHasPrefix(v string) predicate.Statement

PredicateHasPrefix applies the HasPrefix predicate on the "predicate" field.

func PredicateHasSuffix

func PredicateHasSuffix(v string) predicate.Statement

PredicateHasSuffix applies the HasSuffix predicate on the "predicate" field.

func PredicateIn

func PredicateIn(vs ...string) predicate.Statement

PredicateIn applies the In predicate on the "predicate" field.

func PredicateLT

func PredicateLT(v string) predicate.Statement

PredicateLT applies the LT predicate on the "predicate" field.

func PredicateLTE

func PredicateLTE(v string) predicate.Statement

PredicateLTE applies the LTE predicate on the "predicate" field.

func PredicateNEQ

func PredicateNEQ(v string) predicate.Statement

PredicateNEQ applies the NEQ predicate on the "predicate" field.

func PredicateNotIn

func PredicateNotIn(vs ...string) predicate.Statement

PredicateNotIn applies the NotIn predicate on the "predicate" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Statement queries.

func ByAttestationCollectionsField

func ByAttestationCollectionsField(field string, opts ...sql.OrderTermOption) OrderOption

ByAttestationCollectionsField orders the results by attestation_collections field.

func ByDsse

func ByDsse(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByDsse orders the results by dsse terms.

func ByDsseCount

func ByDsseCount(opts ...sql.OrderTermOption) OrderOption

ByDsseCount orders the results by dsse count.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByPolicyField added in v0.5.0

func ByPolicyField(field string, opts ...sql.OrderTermOption) OrderOption

ByPolicyField orders the results by policy field.

func ByPredicate

func ByPredicate(opts ...sql.OrderTermOption) OrderOption

ByPredicate orders the results by the predicate field.

func BySubjects

func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySubjects orders the results by subjects terms.

func BySubjectsCount

func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption

BySubjectsCount orders the results by subjects count.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL