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 uuid.UUID) predicate.Post
- func IDEQ(id uuid.UUID) predicate.Post
- func IDGT(id uuid.UUID) predicate.Post
- func IDGTE(id uuid.UUID) predicate.Post
- func IDIn(ids ...uuid.UUID) predicate.Post
- func IDLT(id uuid.UUID) predicate.Post
- func IDLTE(id uuid.UUID) predicate.Post
- func IDNEQ(id uuid.UUID) predicate.Post
- func IDNotIn(ids ...uuid.UUID) predicate.Post
- func Not(p predicate.Post) predicate.Post
- func Or(predicates ...predicate.Post) predicate.Post
- func Subject(v string) predicate.Post
- func SubjectContains(v string) predicate.Post
- func SubjectContainsFold(v string) predicate.Post
- func SubjectEQ(v string) predicate.Post
- func SubjectEqualFold(v string) predicate.Post
- func SubjectGT(v string) predicate.Post
- func SubjectGTE(v string) predicate.Post
- func SubjectHasPrefix(v string) predicate.Post
- func SubjectHasSuffix(v string) predicate.Post
- func SubjectIn(vs ...string) predicate.Post
- func SubjectLT(v string) predicate.Post
- func SubjectLTE(v string) predicate.Post
- func SubjectNEQ(v string) predicate.Post
- func SubjectNotIn(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 OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByBody(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func BySubject(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) 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" // FieldSubject holds the string denoting the subject field in the database. FieldSubject = "subject" // 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" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_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 ( // SubjectValidator is a validator for the "subject" field. It is called by the builders before save. SubjectValidator func(string) error // BodyValidator is a validator for the "body" field. It is called by the builders before save. BodyValidator func(string) error // 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 // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldSubject, FieldBody, FieldCreatedAt, FieldUpdatedAt, }
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 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 Subject ¶
Subject applies equality check predicate on the "subject" field. It's identical to SubjectEQ.
func SubjectContains ¶
SubjectContains applies the Contains predicate on the "subject" field.
func SubjectContainsFold ¶
SubjectContainsFold applies the ContainsFold predicate on the "subject" field.
func SubjectEqualFold ¶
SubjectEqualFold applies the EqualFold predicate on the "subject" field.
func SubjectGTE ¶
SubjectGTE applies the GTE predicate on the "subject" field.
func SubjectHasPrefix ¶
SubjectHasPrefix applies the HasPrefix predicate on the "subject" field.
func SubjectHasSuffix ¶
SubjectHasSuffix applies the HasSuffix predicate on the "subject" field.
func SubjectLTE ¶
SubjectLTE applies the LTE predicate on the "subject" field.
func SubjectNEQ ¶
SubjectNEQ applies the NEQ predicate on the "subject" field.
func SubjectNotIn ¶
SubjectNotIn applies the NotIn predicate on the "subject" 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 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 BySubject ¶
func BySubject(opts ...sql.OrderTermOption) OrderOption
BySubject orders the results by the subject field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.