Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Post) 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 ValidColumn(column string) bool
- type OrderOption
Constants ¶
View Source
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" // 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 ¶
View Source
var Columns = []string{ FieldID, }
Columns holds all SQL columns for post fields.
View Source
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 HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
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 ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
Click to show internal directories.
Click to hide internal directories.