post

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the post type in the database.
	Label = "post"
	// 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"
	// FieldAuthorID holds the string denoting the author_id field in the database.
	FieldAuthorID = "author_id"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// Table holds the table name of the post in the database.
	Table = "posts"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "posts"
	// 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"
	// AuthorColumn is the table column denoting the author relation/edge.
	AuthorColumn = "author_id"
)

Variables

Columns holds all SQL columns for post fields.

Functions

func And

func And(predicates ...predicate.Post) predicate.Post

And groups predicates with the AND operator between them.

func AuthorID

func AuthorID(v int) predicate.Post

AuthorID applies equality check predicate on the "author_id" field. It's identical to AuthorIDEQ.

func AuthorIDEQ

func AuthorIDEQ(v int) predicate.Post

AuthorIDEQ applies the EQ predicate on the "author_id" field.

func AuthorIDIn

func AuthorIDIn(vs ...int) predicate.Post

AuthorIDIn applies the In predicate on the "author_id" field.

func AuthorIDIsNil

func AuthorIDIsNil() predicate.Post

AuthorIDIsNil applies the IsNil predicate on the "author_id" field.

func AuthorIDNEQ

func AuthorIDNEQ(v int) predicate.Post

AuthorIDNEQ applies the NEQ predicate on the "author_id" field.

func AuthorIDNotIn

func AuthorIDNotIn(vs ...int) predicate.Post

AuthorIDNotIn applies the NotIn predicate on the "author_id" field.

func AuthorIDNotNil

func AuthorIDNotNil() predicate.Post

AuthorIDNotNil applies the NotNil predicate on the "author_id" field.

func HasAuthor

func HasAuthor() predicate.Post

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

func HasAuthorWith

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

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

func ID

func ID(id int) predicate.Post

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Post

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Post

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Post

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Post

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Post

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Post

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Text

func Text(v string) predicate.Post

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

func TextContains

func TextContains(v string) predicate.Post

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

func TextContainsFold

func TextContainsFold(v string) predicate.Post

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

func TextEQ

func TextEQ(v string) predicate.Post

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

func TextEqualFold

func TextEqualFold(v string) predicate.Post

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

func TextGT

func TextGT(v string) predicate.Post

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

func TextGTE

func TextGTE(v string) predicate.Post

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

func TextHasPrefix

func TextHasPrefix(v string) predicate.Post

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

func TextHasSuffix

func TextHasSuffix(v string) predicate.Post

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

func TextIn

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

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

func TextLT

func TextLT(v string) predicate.Post

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

func TextLTE

func TextLTE(v string) predicate.Post

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

func TextNEQ

func TextNEQ(v string) predicate.Post

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

func TextNotIn

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

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

This section is empty.

Jump to

Keyboard shortcuts

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