Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Post) predicate.Post
- func Body(v string) predicate.Post
- func BodyContains(v string) predicate.Post
- func BodyContainsFold(v string) predicate.Post
- func BodyEQ(v string) predicate.Post
- func BodyEqualFold(v string) predicate.Post
- func BodyGT(v string) predicate.Post
- func BodyGTE(v string) predicate.Post
- func BodyHasPrefix(v string) predicate.Post
- func BodyHasSuffix(v string) predicate.Post
- func BodyIn(vs ...string) predicate.Post
- func BodyLT(v string) predicate.Post
- func BodyLTE(v string) predicate.Post
- func BodyNEQ(v string) predicate.Post
- func BodyNotIn(vs ...string) predicate.Post
- func CreatedAt(v time.Time) predicate.Post
- func CreatedAtEQ(v time.Time) predicate.Post
- func CreatedAtGT(v time.Time) predicate.Post
- func CreatedAtGTE(v time.Time) predicate.Post
- func CreatedAtIn(vs ...time.Time) predicate.Post
- func CreatedAtLT(v time.Time) predicate.Post
- func CreatedAtLTE(v time.Time) predicate.Post
- func CreatedAtNEQ(v time.Time) predicate.Post
- func CreatedAtNotIn(vs ...time.Time) predicate.Post
- func HasAuthor() predicate.Post
- func HasAuthorWith(preds ...predicate.User) predicate.Post
- func ID(id int) predicate.Post
- func IDEQ(id int) predicate.Post
- func IDGT(id int) predicate.Post
- func IDGTE(id int) predicate.Post
- func IDIn(ids ...int) predicate.Post
- func IDLT(id int) predicate.Post
- func IDLTE(id int) predicate.Post
- func IDNEQ(id int) predicate.Post
- func IDNotIn(ids ...int) predicate.Post
- func Not(p predicate.Post) predicate.Post
- func Or(predicates ...predicate.Post) predicate.Post
- func Title(v string) predicate.Post
- func TitleContains(v string) predicate.Post
- func TitleContainsFold(v string) predicate.Post
- func TitleEQ(v string) predicate.Post
- func TitleEqualFold(v string) predicate.Post
- func TitleGT(v string) predicate.Post
- func TitleGTE(v string) predicate.Post
- func TitleHasPrefix(v string) predicate.Post
- func TitleHasSuffix(v string) predicate.Post
- func TitleIn(vs ...string) predicate.Post
- func TitleLT(v string) predicate.Post
- func TitleLTE(v string) predicate.Post
- func TitleNEQ(v string) predicate.Post
- func TitleNotIn(vs ...string) predicate.Post
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
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" // 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" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // 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 = "user_posts" )
Variables ¶
var Columns = []string{ FieldID, FieldTitle, FieldBody, FieldCreatedAt, }
Columns holds all SQL columns for post fields.
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt time.Time )
var ForeignKeys = []string{
"user_posts",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "posts" table and are not defined as standalone fields in the schema.
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 CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
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 Post queries.
func ByAuthorField ¶
func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
ByAuthorField orders the results by author field.
func ByBody ¶
func ByBody(opts ...sql.OrderTermOption) OrderOption
ByBody orders the results by the body field.
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 ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.