article

package
v0.0.0-...-690d607 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the article type in the database.
	Label = "article"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// FieldPublishedAt holds the string denoting the published_at field in the database.
	FieldPublishedAt = "published_at"
	// Table holds the table name of the article in the database.
	Table = "articles"
)

Variables

View Source
var (
	// DefaultTitle holds the default value on creation for the "title" field.
	DefaultTitle string
	// DefaultBody holds the default value on creation for the "body" field.
	DefaultBody string
	// DefaultPublishedAt holds the default value on creation for the "published_at" field.
	DefaultPublishedAt func() time.Time
)

Columns holds all SQL columns for article fields.

Functions

func And

func And(predicates ...predicate.Article) predicate.Article

And groups predicates with the AND operator between them.

func Body

func Body(v string) predicate.Article

Body applies equality check predicate on the "body" field. It's identical to BodyEQ.

func BodyContains

func BodyContains(v string) predicate.Article

BodyContains applies the Contains predicate on the "body" field.

func BodyContainsFold

func BodyContainsFold(v string) predicate.Article

BodyContainsFold applies the ContainsFold predicate on the "body" field.

func BodyEQ

func BodyEQ(v string) predicate.Article

BodyEQ applies the EQ predicate on the "body" field.

func BodyEqualFold

func BodyEqualFold(v string) predicate.Article

BodyEqualFold applies the EqualFold predicate on the "body" field.

func BodyGT

func BodyGT(v string) predicate.Article

BodyGT applies the GT predicate on the "body" field.

func BodyGTE

func BodyGTE(v string) predicate.Article

BodyGTE applies the GTE predicate on the "body" field.

func BodyHasPrefix

func BodyHasPrefix(v string) predicate.Article

BodyHasPrefix applies the HasPrefix predicate on the "body" field.

func BodyHasSuffix

func BodyHasSuffix(v string) predicate.Article

BodyHasSuffix applies the HasSuffix predicate on the "body" field.

func BodyIn

func BodyIn(vs ...string) predicate.Article

BodyIn applies the In predicate on the "body" field.

func BodyLT

func BodyLT(v string) predicate.Article

BodyLT applies the LT predicate on the "body" field.

func BodyLTE

func BodyLTE(v string) predicate.Article

BodyLTE applies the LTE predicate on the "body" field.

func BodyNEQ

func BodyNEQ(v string) predicate.Article

BodyNEQ applies the NEQ predicate on the "body" field.

func BodyNotIn

func BodyNotIn(vs ...string) predicate.Article

BodyNotIn applies the NotIn predicate on the "body" field.

func ID

func ID(id int64) predicate.Article

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Article

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Article

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Article

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Article

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Article

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Article

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Article

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Article

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

Or groups predicates with the OR operator between them.

func PublishedAt

func PublishedAt(v time.Time) predicate.Article

PublishedAt applies equality check predicate on the "published_at" field. It's identical to PublishedAtEQ.

func PublishedAtEQ

func PublishedAtEQ(v time.Time) predicate.Article

PublishedAtEQ applies the EQ predicate on the "published_at" field.

func PublishedAtGT

func PublishedAtGT(v time.Time) predicate.Article

PublishedAtGT applies the GT predicate on the "published_at" field.

func PublishedAtGTE

func PublishedAtGTE(v time.Time) predicate.Article

PublishedAtGTE applies the GTE predicate on the "published_at" field.

func PublishedAtIn

func PublishedAtIn(vs ...time.Time) predicate.Article

PublishedAtIn applies the In predicate on the "published_at" field.

func PublishedAtLT

func PublishedAtLT(v time.Time) predicate.Article

PublishedAtLT applies the LT predicate on the "published_at" field.

func PublishedAtLTE

func PublishedAtLTE(v time.Time) predicate.Article

PublishedAtLTE applies the LTE predicate on the "published_at" field.

func PublishedAtNEQ

func PublishedAtNEQ(v time.Time) predicate.Article

PublishedAtNEQ applies the NEQ predicate on the "published_at" field.

func PublishedAtNotIn

func PublishedAtNotIn(vs ...time.Time) predicate.Article

PublishedAtNotIn applies the NotIn predicate on the "published_at" field.

func Title

func Title(v string) predicate.Article

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Article

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Article

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Article

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Article

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Article

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Article

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Article

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Article

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Article

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Article

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Article

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Article

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Article

TitleNotIn applies the NotIn predicate on the "title" 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 Article queries.

func ByBody

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

ByBody orders the results by the body field.

func ByID

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

ByID orders the results by the id field.

func ByPublishedAt

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

ByPublishedAt orders the results by the published_at field.

func ByTitle

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

ByTitle orders the results by the title field.

Jump to

Keyboard shortcuts

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