scope

package
v0.0.0-...-6aa0337 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the scope type in the database.
	Label = "scope"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldCustomID holds the string denoting the custom_id field in the database.
	FieldCustomID = "custom_id"
	// FieldNonce holds the string denoting the nonce field in the database.
	FieldNonce = "nonce"
	// FieldDomain holds the string denoting the domain field in the database.
	FieldDomain = "domain"
	// EdgeFacts holds the string denoting the facts edge name in mutations.
	EdgeFacts = "facts"
	// Table holds the table name of the scope in the database.
	Table = "scopes"
	// FactsTable is the table that holds the facts relation/edge.
	FactsTable = "facts"
	// FactsInverseTable is the table name for the Fact entity.
	// It exists in this package in order to avoid circular dependency with the "fact" package.
	FactsInverseTable = "facts"
	// FactsColumn is the table column denoting the facts relation/edge.
	FactsColumn = "scope_facts"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultNonce holds the default value on creation for the "nonce" field.
	DefaultNonce func() string
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for scope fields.

Functions

func And

func And(predicates ...predicate.Scope) predicate.Scope

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Scope

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Scope

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Scope

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Scope

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Scope

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Scope

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Scope

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Scope

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Scope

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CustomID

func CustomID(v string) predicate.Scope

CustomID applies equality check predicate on the "custom_id" field. It's identical to CustomIDEQ.

func CustomIDContains

func CustomIDContains(v string) predicate.Scope

CustomIDContains applies the Contains predicate on the "custom_id" field.

func CustomIDContainsFold

func CustomIDContainsFold(v string) predicate.Scope

CustomIDContainsFold applies the ContainsFold predicate on the "custom_id" field.

func CustomIDEQ

func CustomIDEQ(v string) predicate.Scope

CustomIDEQ applies the EQ predicate on the "custom_id" field.

func CustomIDEqualFold

func CustomIDEqualFold(v string) predicate.Scope

CustomIDEqualFold applies the EqualFold predicate on the "custom_id" field.

func CustomIDGT

func CustomIDGT(v string) predicate.Scope

CustomIDGT applies the GT predicate on the "custom_id" field.

func CustomIDGTE

func CustomIDGTE(v string) predicate.Scope

CustomIDGTE applies the GTE predicate on the "custom_id" field.

func CustomIDHasPrefix

func CustomIDHasPrefix(v string) predicate.Scope

CustomIDHasPrefix applies the HasPrefix predicate on the "custom_id" field.

func CustomIDHasSuffix

func CustomIDHasSuffix(v string) predicate.Scope

CustomIDHasSuffix applies the HasSuffix predicate on the "custom_id" field.

func CustomIDIn

func CustomIDIn(vs ...string) predicate.Scope

CustomIDIn applies the In predicate on the "custom_id" field.

func CustomIDLT

func CustomIDLT(v string) predicate.Scope

CustomIDLT applies the LT predicate on the "custom_id" field.

func CustomIDLTE

func CustomIDLTE(v string) predicate.Scope

CustomIDLTE applies the LTE predicate on the "custom_id" field.

func CustomIDNEQ

func CustomIDNEQ(v string) predicate.Scope

CustomIDNEQ applies the NEQ predicate on the "custom_id" field.

func CustomIDNotIn

func CustomIDNotIn(vs ...string) predicate.Scope

CustomIDNotIn applies the NotIn predicate on the "custom_id" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Scope

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Scope

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Scope

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Scope

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Scope

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Scope

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Scope

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Scope

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Scope

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Scope

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Scope

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func Domain

func Domain(v string) predicate.Scope

Domain applies equality check predicate on the "domain" field. It's identical to DomainEQ.

func DomainContains

func DomainContains(v string) predicate.Scope

DomainContains applies the Contains predicate on the "domain" field.

func DomainContainsFold

func DomainContainsFold(v string) predicate.Scope

DomainContainsFold applies the ContainsFold predicate on the "domain" field.

func DomainEQ

func DomainEQ(v string) predicate.Scope

DomainEQ applies the EQ predicate on the "domain" field.

func DomainEqualFold

func DomainEqualFold(v string) predicate.Scope

DomainEqualFold applies the EqualFold predicate on the "domain" field.

func DomainGT

func DomainGT(v string) predicate.Scope

DomainGT applies the GT predicate on the "domain" field.

func DomainGTE

func DomainGTE(v string) predicate.Scope

DomainGTE applies the GTE predicate on the "domain" field.

func DomainHasPrefix

func DomainHasPrefix(v string) predicate.Scope

DomainHasPrefix applies the HasPrefix predicate on the "domain" field.

func DomainHasSuffix

func DomainHasSuffix(v string) predicate.Scope

DomainHasSuffix applies the HasSuffix predicate on the "domain" field.

func DomainIn

func DomainIn(vs ...string) predicate.Scope

DomainIn applies the In predicate on the "domain" field.

func DomainLT

func DomainLT(v string) predicate.Scope

DomainLT applies the LT predicate on the "domain" field.

func DomainLTE

func DomainLTE(v string) predicate.Scope

DomainLTE applies the LTE predicate on the "domain" field.

func DomainNEQ

func DomainNEQ(v string) predicate.Scope

DomainNEQ applies the NEQ predicate on the "domain" field.

func DomainNotIn

func DomainNotIn(vs ...string) predicate.Scope

DomainNotIn applies the NotIn predicate on the "domain" field.

func HasFacts

func HasFacts() predicate.Scope

HasFacts applies the HasEdge predicate on the "facts" edge.

func HasFactsWith

func HasFactsWith(preds ...predicate.Fact) predicate.Scope

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

func ID

func ID(id string) predicate.Scope

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Scope

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Scope

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Scope

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Scope

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Scope

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Scope

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Scope

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Scope

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Scope

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Scope

IDNotIn applies the NotIn predicate on the ID field.

func Nonce

func Nonce(v string) predicate.Scope

Nonce applies equality check predicate on the "nonce" field. It's identical to NonceEQ.

func NonceContains

func NonceContains(v string) predicate.Scope

NonceContains applies the Contains predicate on the "nonce" field.

func NonceContainsFold

func NonceContainsFold(v string) predicate.Scope

NonceContainsFold applies the ContainsFold predicate on the "nonce" field.

func NonceEQ

func NonceEQ(v string) predicate.Scope

NonceEQ applies the EQ predicate on the "nonce" field.

func NonceEqualFold

func NonceEqualFold(v string) predicate.Scope

NonceEqualFold applies the EqualFold predicate on the "nonce" field.

func NonceGT

func NonceGT(v string) predicate.Scope

NonceGT applies the GT predicate on the "nonce" field.

func NonceGTE

func NonceGTE(v string) predicate.Scope

NonceGTE applies the GTE predicate on the "nonce" field.

func NonceHasPrefix

func NonceHasPrefix(v string) predicate.Scope

NonceHasPrefix applies the HasPrefix predicate on the "nonce" field.

func NonceHasSuffix

func NonceHasSuffix(v string) predicate.Scope

NonceHasSuffix applies the HasSuffix predicate on the "nonce" field.

func NonceIn

func NonceIn(vs ...string) predicate.Scope

NonceIn applies the In predicate on the "nonce" field.

func NonceLT

func NonceLT(v string) predicate.Scope

NonceLT applies the LT predicate on the "nonce" field.

func NonceLTE

func NonceLTE(v string) predicate.Scope

NonceLTE applies the LTE predicate on the "nonce" field.

func NonceNEQ

func NonceNEQ(v string) predicate.Scope

NonceNEQ applies the NEQ predicate on the "nonce" field.

func NonceNotIn

func NonceNotIn(vs ...string) predicate.Scope

NonceNotIn applies the NotIn predicate on the "nonce" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Scope) predicate.Scope

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Scope

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Scope

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Scope

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Scope

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Scope

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Scope

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Scope

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Scope

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Scope

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Scope queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCustomID

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

ByCustomID orders the results by the custom_id field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDomain

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

ByDomain orders the results by the domain field.

func ByFacts

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

ByFacts orders the results by facts terms.

func ByFactsCount

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

ByFactsCount orders the results by facts count.

func ByID

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

ByID orders the results by the id field.

func ByNonce

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

ByNonce orders the results by the nonce field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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