definition

package
v0.0.0-...-192b5dc Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the definition type in the database.
	Label = "definition"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// EdgeSynset holds the string denoting the synset edge name in mutations.
	EdgeSynset = "synset"
	// Table holds the table name of the definition in the database.
	Table = "definitions"
	// SynsetTable is the table that holds the synset relation/edge.
	SynsetTable = "definitions"
	// SynsetInverseTable is the table name for the Synset entity.
	// It exists in this package in order to avoid circular dependency with the "synset" package.
	SynsetInverseTable = "synsets"
	// SynsetColumn is the table column denoting the synset relation/edge.
	SynsetColumn = "synset_definitions"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldText,
}

Columns holds all SQL columns for definition fields.

View Source
var ForeignKeys = []string{
	"synset_definitions",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "definitions" table and are not defined as standalone fields in the schema.

View Source
var (
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Definition) predicate.Definition

And groups predicates with the AND operator between them.

func HasSynset

func HasSynset() predicate.Definition

HasSynset applies the HasEdge predicate on the "synset" edge.

func HasSynsetWith

func HasSynsetWith(preds ...predicate.Synset) predicate.Definition

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

func ID

func ID(id int) predicate.Definition

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Definition

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Definition

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Definition

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Definition

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Definition

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Definition

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Definition

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Definition

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

Or groups predicates with the OR operator between them.

func Text

func Text(v string) predicate.Definition

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Definition

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Definition

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Definition

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Definition

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Definition

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Definition

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Definition

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Definition

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Definition

TextIn applies the In predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Definition

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Definition

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Definition

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Definition

TextNotIn applies the NotIn predicate on the "text" 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 Definition queries.

func ByID

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

ByID orders the results by the id field.

func BySynsetField

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

BySynsetField orders the results by synset field.

func ByText

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

ByText orders the results by the text field.

Jump to

Keyboard shortcuts

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