Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Post) predicate.Post
- func Content(v string) predicate.Post
- func ContentContains(v string) predicate.Post
- func ContentContainsFold(v string) predicate.Post
- func ContentEQ(v string) predicate.Post
- func ContentEqualFold(v string) predicate.Post
- func ContentGT(v string) predicate.Post
- func ContentGTE(v string) predicate.Post
- func ContentHasPrefix(v string) predicate.Post
- func ContentHasSuffix(v string) predicate.Post
- func ContentIn(vs ...string) predicate.Post
- func ContentIsNil() predicate.Post
- func ContentLT(v string) predicate.Post
- func ContentLTE(v string) predicate.Post
- func ContentNEQ(v string) predicate.Post
- func ContentNotIn(vs ...string) predicate.Post
- func ContentNotNil() 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 HasComments() predicate.Post
- func HasCommentsWith(preds ...predicate.Comment) predicate.Post
- func HasUser() predicate.Post
- func HasUserWith(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 PublishedAt(v time.Time) predicate.Post
- func PublishedAtEQ(v time.Time) predicate.Post
- func PublishedAtGT(v time.Time) predicate.Post
- func PublishedAtGTE(v time.Time) predicate.Post
- func PublishedAtIn(vs ...time.Time) predicate.Post
- func PublishedAtIsNil() predicate.Post
- func PublishedAtLT(v time.Time) predicate.Post
- func PublishedAtLTE(v time.Time) predicate.Post
- func PublishedAtNEQ(v time.Time) predicate.Post
- func PublishedAtNotIn(vs ...time.Time) predicate.Post
- func PublishedAtNotNil() 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 UpdatedAt(v time.Time) predicate.Post
- func UpdatedAtEQ(v time.Time) predicate.Post
- func UpdatedAtGT(v time.Time) predicate.Post
- func UpdatedAtGTE(v time.Time) predicate.Post
- func UpdatedAtIn(vs ...time.Time) predicate.Post
- func UpdatedAtLT(v time.Time) predicate.Post
- func UpdatedAtLTE(v time.Time) predicate.Post
- func UpdatedAtNEQ(v time.Time) predicate.Post
- func UpdatedAtNotIn(vs ...time.Time) predicate.Post
- func ValidColumn(column string) bool
- type Order
- func ByComments(term sql.OrderTerm, terms ...sql.OrderTerm) Order
- func ByCommentsCount(opts ...sql.OrderTermOption) Order
- func ByContent(opts ...sql.OrderTermOption) Order
- func ByCreatedAt(opts ...sql.OrderTermOption) Order
- func ByID(opts ...sql.OrderTermOption) Order
- func ByPublishedAt(opts ...sql.OrderTermOption) Order
- func ByTitle(opts ...sql.OrderTermOption) Order
- func ByUpdatedAt(opts ...sql.OrderTermOption) Order
- func ByUserField(field string, opts ...sql.OrderTermOption) Order
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" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldPublishedAt holds the string denoting the published_at field in the database. FieldPublishedAt = "published_at" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeComments holds the string denoting the comments edge name in mutations. EdgeComments = "comments" // Table holds the table name of the post in the database. Table = "posts" // UserTable is the table that holds the user relation/edge. UserTable = "posts" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_posts" // CommentsTable is the table that holds the comments relation/edge. CommentsTable = "comments" // CommentsInverseTable is the table name for the Comment entity. // It exists in this package in order to avoid circular dependency with the "comment" package. CommentsInverseTable = "comments" // CommentsColumn is the table column denoting the comments relation/edge. CommentsColumn = "post_comments" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time )
var Columns = []string{ FieldID, FieldTitle, FieldContent, FieldCreatedAt, FieldUpdatedAt, FieldPublishedAt, }
Columns holds all SQL columns for post fields.
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 Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentIsNil ¶
ContentIsNil applies the IsNil predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func ContentNotNil ¶
ContentNotNil applies the NotNil predicate on the "content" 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 HasComments ¶
HasComments applies the HasEdge predicate on the "comments" edge.
func HasCommentsWith ¶
HasCommentsWith applies the HasEdge predicate on the "comments" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
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 PublishedAtIsNil ¶
PublishedAtIsNil applies the IsNil 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 PublishedAtNotNil ¶
PublishedAtNotNil applies the NotNil 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 UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type Order ¶
Order defines the ordering method for the Post queries.
func ByComments ¶
ByComments orders the results by comments terms.
func ByCommentsCount ¶
func ByCommentsCount(opts ...sql.OrderTermOption) Order
ByCommentsCount orders the results by comments count.
func ByContent ¶
func ByContent(opts ...sql.OrderTermOption) Order
ByContent orders the results by the content field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) Order
ByCreatedAt orders the results by the created_at field.
func ByPublishedAt ¶
func ByPublishedAt(opts ...sql.OrderTermOption) Order
ByPublishedAt orders the results by the published_at field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) Order
ByTitle orders the results by the title field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) Order
ByUpdatedAt orders the results by the updated_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) Order
ByUserField orders the results by user field.