Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Article) predicate.Article
- func Body(v string) predicate.Article
- func BodyContains(v string) predicate.Article
- func BodyContainsFold(v string) predicate.Article
- func BodyEQ(v string) predicate.Article
- func BodyEqualFold(v string) predicate.Article
- func BodyGT(v string) predicate.Article
- func BodyGTE(v string) predicate.Article
- func BodyHasPrefix(v string) predicate.Article
- func BodyHasSuffix(v string) predicate.Article
- func BodyIn(vs ...string) predicate.Article
- func BodyLT(v string) predicate.Article
- func BodyLTE(v string) predicate.Article
- func BodyNEQ(v string) predicate.Article
- func BodyNotIn(vs ...string) predicate.Article
- func ID(id int64) predicate.Article
- func IDEQ(id int64) predicate.Article
- func IDGT(id int64) predicate.Article
- func IDGTE(id int64) predicate.Article
- func IDIn(ids ...int64) predicate.Article
- func IDLT(id int64) predicate.Article
- func IDLTE(id int64) predicate.Article
- func IDNEQ(id int64) predicate.Article
- func IDNotIn(ids ...int64) predicate.Article
- func Not(p predicate.Article) predicate.Article
- func Or(predicates ...predicate.Article) predicate.Article
- func PublishedAt(v time.Time) predicate.Article
- func PublishedAtEQ(v time.Time) predicate.Article
- func PublishedAtGT(v time.Time) predicate.Article
- func PublishedAtGTE(v time.Time) predicate.Article
- func PublishedAtIn(vs ...time.Time) predicate.Article
- func PublishedAtLT(v time.Time) predicate.Article
- func PublishedAtLTE(v time.Time) predicate.Article
- func PublishedAtNEQ(v time.Time) predicate.Article
- func PublishedAtNotIn(vs ...time.Time) predicate.Article
- func Title(v string) predicate.Article
- func TitleContains(v string) predicate.Article
- func TitleContainsFold(v string) predicate.Article
- func TitleEQ(v string) predicate.Article
- func TitleEqualFold(v string) predicate.Article
- func TitleGT(v string) predicate.Article
- func TitleGTE(v string) predicate.Article
- func TitleHasPrefix(v string) predicate.Article
- func TitleHasSuffix(v string) predicate.Article
- func TitleIn(vs ...string) predicate.Article
- func TitleLT(v string) predicate.Article
- func TitleLTE(v string) predicate.Article
- func TitleNEQ(v string) predicate.Article
- func TitleNotIn(vs ...string) predicate.Article
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldTitle, FieldBody, FieldPublishedAt, }
Columns holds all SQL columns for article fields.
Functions ¶
func BodyContains ¶
BodyContains applies the Contains predicate on the "body" field.
func BodyContainsFold ¶
BodyContainsFold applies the ContainsFold predicate on the "body" field.
func BodyEqualFold ¶
BodyEqualFold applies the EqualFold predicate on the "body" field.
func BodyHasPrefix ¶
BodyHasPrefix applies the HasPrefix predicate on the "body" field.
func BodyHasSuffix ¶
BodyHasSuffix applies the HasSuffix predicate on the "body" field.
func PublishedAt ¶
PublishedAt applies equality check predicate on the "published_at" field. It's identical to PublishedAtEQ.
func PublishedAtEQ ¶
PublishedAtEQ applies the EQ predicate on the "published_at" field.
func PublishedAtGT ¶
PublishedAtGT applies the GT predicate on the "published_at" field.
func PublishedAtGTE ¶
PublishedAtGTE applies the GTE predicate on the "published_at" field.
func PublishedAtIn ¶
PublishedAtIn applies the In predicate on the "published_at" field.
func PublishedAtLT ¶
PublishedAtLT applies the LT predicate on the "published_at" field.
func PublishedAtLTE ¶
PublishedAtLTE applies the LTE predicate on the "published_at" field.
func PublishedAtNEQ ¶
PublishedAtNEQ applies the NEQ predicate on the "published_at" field.
func PublishedAtNotIn ¶
PublishedAtNotIn applies the NotIn predicate on the "published_at" field.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.