sentence

package
v0.0.0-...-fc33bc3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the sentence type in the database.
	Label = "sentence"
	// 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"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldOrder holds the string denoting the order field in the database.
	FieldOrder = "order"
	// EdgeStory holds the string denoting the story edge name in mutations.
	EdgeStory = "story"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// Table holds the table name of the sentence in the database.
	Table = "sentences"
	// StoryTable is the table that holds the story relation/edge.
	StoryTable = "sentences"
	// StoryInverseTable is the table name for the Story entity.
	// It exists in this package in order to avoid circular dependency with the "story" package.
	StoryInverseTable = "stories"
	// StoryColumn is the table column denoting the story relation/edge.
	StoryColumn = "story_sentences"
	// AuthorTable is the table that holds the author relation/edge. The primary key declared below.
	AuthorTable = "user_sentences"
	// AuthorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	AuthorInverseTable = "users"
)

Variables

View Source
var (
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// OrderValidator is a validator for the "order" field. It is called by the builders before save.
	OrderValidator func(int) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var (
	// AuthorPrimaryKey and AuthorColumn2 are the table columns denoting the
	// primary key for the author relation (M2M).
	AuthorPrimaryKey = []string{"user_id", "sentence_id"}
)

Columns holds all SQL columns for sentence fields.

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

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

Functions

func And

func And(predicates ...predicate.Sentence) predicate.Sentence

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Sentence

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Sentence

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Sentence

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Sentence

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Sentence

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Sentence

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Sentence

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

func CreatedAtNotIn

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

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

func HasAuthor

func HasAuthor() predicate.Sentence

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.Sentence

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

func HasStory

func HasStory() predicate.Sentence

HasStory applies the HasEdge predicate on the "story" edge.

func HasStoryWith

func HasStoryWith(preds ...predicate.Story) predicate.Sentence

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

func ID

func ID(id uuid.UUID) predicate.Sentence

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Sentence

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Sentence

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Sentence

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Sentence

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Sentence

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Sentence

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Order

func Order(v int) predicate.Sentence

Order applies equality check predicate on the "order" field. It's identical to OrderEQ.

func OrderEQ

func OrderEQ(v int) predicate.Sentence

OrderEQ applies the EQ predicate on the "order" field.

func OrderGT

func OrderGT(v int) predicate.Sentence

OrderGT applies the GT predicate on the "order" field.

func OrderGTE

func OrderGTE(v int) predicate.Sentence

OrderGTE applies the GTE predicate on the "order" field.

func OrderIn

func OrderIn(vs ...int) predicate.Sentence

OrderIn applies the In predicate on the "order" field.

func OrderLT

func OrderLT(v int) predicate.Sentence

OrderLT applies the LT predicate on the "order" field.

func OrderLTE

func OrderLTE(v int) predicate.Sentence

OrderLTE applies the LTE predicate on the "order" field.

func OrderNEQ

func OrderNEQ(v int) predicate.Sentence

OrderNEQ applies the NEQ predicate on the "order" field.

func OrderNotIn

func OrderNotIn(vs ...int) predicate.Sentence

OrderNotIn applies the NotIn predicate on the "order" field.

func Text

func Text(v string) predicate.Sentence

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

func TextContains

func TextContains(v string) predicate.Sentence

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

func TextContainsFold

func TextContainsFold(v string) predicate.Sentence

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

func TextEQ

func TextEQ(v string) predicate.Sentence

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

func TextEqualFold

func TextEqualFold(v string) predicate.Sentence

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

func TextGT

func TextGT(v string) predicate.Sentence

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

func TextGTE

func TextGTE(v string) predicate.Sentence

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

func TextHasPrefix

func TextHasPrefix(v string) predicate.Sentence

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

func TextHasSuffix

func TextHasSuffix(v string) predicate.Sentence

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

func TextIn

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

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

func TextLT

func TextLT(v string) predicate.Sentence

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

func TextLTE

func TextLTE(v string) predicate.Sentence

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

func TextNEQ

func TextNEQ(v string) predicate.Sentence

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

func TextNotIn

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

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 Sentence queries.

func ByAuthor

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

ByAuthor orders the results by author terms.

func ByAuthorCount

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

ByAuthorCount orders the results by author count.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByOrder

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

ByOrder orders the results by the order field.

func ByStoryField

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

ByStoryField orders the results by story 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