searchquery

package
v0.0.0-...-4d10510 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the searchquery type in the database.
	Label = "search_query"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldQuery holds the string denoting the query field in the database.
	FieldQuery = "query"
	// FieldCreated holds the string denoting the created field in the database.
	FieldCreated = "created"
	// FieldOwner holds the string denoting the owner field in the database.
	FieldOwner = "owner"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the searchquery in the database.
	Table = "search_queries"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "search_queries"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "owner"
)

Variables

View Source
var (
	// QueryValidator is a validator for the "query" field. It is called by the builders before save.
	QueryValidator func(string) error
	// DefaultCreated holds the default value on creation for the "created" field.
	DefaultCreated func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for searchquery fields.

Functions

func And

func And(predicates ...predicate.SearchQuery) predicate.SearchQuery

And groups predicates with the AND operator between them.

func Created

func Created(v time.Time) predicate.SearchQuery

Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.

func CreatedEQ

func CreatedEQ(v time.Time) predicate.SearchQuery

CreatedEQ applies the EQ predicate on the "created" field.

func CreatedGT

func CreatedGT(v time.Time) predicate.SearchQuery

CreatedGT applies the GT predicate on the "created" field.

func CreatedGTE

func CreatedGTE(v time.Time) predicate.SearchQuery

CreatedGTE applies the GTE predicate on the "created" field.

func CreatedIn

func CreatedIn(vs ...time.Time) predicate.SearchQuery

CreatedIn applies the In predicate on the "created" field.

func CreatedLT

func CreatedLT(v time.Time) predicate.SearchQuery

CreatedLT applies the LT predicate on the "created" field.

func CreatedLTE

func CreatedLTE(v time.Time) predicate.SearchQuery

CreatedLTE applies the LTE predicate on the "created" field.

func CreatedNEQ

func CreatedNEQ(v time.Time) predicate.SearchQuery

CreatedNEQ applies the NEQ predicate on the "created" field.

func CreatedNotIn

func CreatedNotIn(vs ...time.Time) predicate.SearchQuery

CreatedNotIn applies the NotIn predicate on the "created" field.

func HasUser

func HasUser() predicate.SearchQuery

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.SearchQuery

HasUserWith applies the HasEdge predicate on the "user" 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.SearchQuery

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.SearchQuery

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.SearchQuery

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.SearchQuery

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.SearchQuery

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.SearchQuery

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.SearchQuery) predicate.SearchQuery

Or groups predicates with the OR operator between them.

func Owner

func Owner(v uuid.UUID) predicate.SearchQuery

Owner applies equality check predicate on the "owner" field. It's identical to OwnerEQ.

func OwnerEQ

func OwnerEQ(v uuid.UUID) predicate.SearchQuery

OwnerEQ applies the EQ predicate on the "owner" field.

func OwnerIn

func OwnerIn(vs ...uuid.UUID) predicate.SearchQuery

OwnerIn applies the In predicate on the "owner" field.

func OwnerNEQ

func OwnerNEQ(v uuid.UUID) predicate.SearchQuery

OwnerNEQ applies the NEQ predicate on the "owner" field.

func OwnerNotIn

func OwnerNotIn(vs ...uuid.UUID) predicate.SearchQuery

OwnerNotIn applies the NotIn predicate on the "owner" field.

func Query

func Query(v string) predicate.SearchQuery

Query applies equality check predicate on the "query" field. It's identical to QueryEQ.

func QueryContains

func QueryContains(v string) predicate.SearchQuery

QueryContains applies the Contains predicate on the "query" field.

func QueryContainsFold

func QueryContainsFold(v string) predicate.SearchQuery

QueryContainsFold applies the ContainsFold predicate on the "query" field.

func QueryEQ

func QueryEQ(v string) predicate.SearchQuery

QueryEQ applies the EQ predicate on the "query" field.

func QueryEqualFold

func QueryEqualFold(v string) predicate.SearchQuery

QueryEqualFold applies the EqualFold predicate on the "query" field.

func QueryGT

func QueryGT(v string) predicate.SearchQuery

QueryGT applies the GT predicate on the "query" field.

func QueryGTE

func QueryGTE(v string) predicate.SearchQuery

QueryGTE applies the GTE predicate on the "query" field.

func QueryHasPrefix

func QueryHasPrefix(v string) predicate.SearchQuery

QueryHasPrefix applies the HasPrefix predicate on the "query" field.

func QueryHasSuffix

func QueryHasSuffix(v string) predicate.SearchQuery

QueryHasSuffix applies the HasSuffix predicate on the "query" field.

func QueryIn

func QueryIn(vs ...string) predicate.SearchQuery

QueryIn applies the In predicate on the "query" field.

func QueryLT

func QueryLT(v string) predicate.SearchQuery

QueryLT applies the LT predicate on the "query" field.

func QueryLTE

func QueryLTE(v string) predicate.SearchQuery

QueryLTE applies the LTE predicate on the "query" field.

func QueryNEQ

func QueryNEQ(v string) predicate.SearchQuery

QueryNEQ applies the NEQ predicate on the "query" field.

func QueryNotIn

func QueryNotIn(vs ...string) predicate.SearchQuery

QueryNotIn applies the NotIn predicate on the "query" 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 SearchQuery queries.

func ByCreated

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

ByCreated orders the results by the created field.

func ByID

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

ByID orders the results by the id field.

func ByOwner

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

ByOwner orders the results by the owner field.

func ByQuery

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

ByQuery orders the results by the query field.

func ByUserField

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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