Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Answer) predicate.Answer
- func Content(v string) predicate.Answer
- func ContentContains(v string) predicate.Answer
- func ContentContainsFold(v string) predicate.Answer
- func ContentEQ(v string) predicate.Answer
- func ContentEqualFold(v string) predicate.Answer
- func ContentGT(v string) predicate.Answer
- func ContentGTE(v string) predicate.Answer
- func ContentHasPrefix(v string) predicate.Answer
- func ContentHasSuffix(v string) predicate.Answer
- func ContentIn(vs ...string) predicate.Answer
- func ContentLT(v string) predicate.Answer
- func ContentLTE(v string) predicate.Answer
- func ContentNEQ(v string) predicate.Answer
- func ContentNotIn(vs ...string) predicate.Answer
- func CreatedAt(v time.Time) predicate.Answer
- func CreatedAtEQ(v time.Time) predicate.Answer
- func CreatedAtGT(v time.Time) predicate.Answer
- func CreatedAtGTE(v time.Time) predicate.Answer
- func CreatedAtIn(vs ...time.Time) predicate.Answer
- func CreatedAtLT(v time.Time) predicate.Answer
- func CreatedAtLTE(v time.Time) predicate.Answer
- func CreatedAtNEQ(v time.Time) predicate.Answer
- func CreatedAtNotIn(vs ...time.Time) predicate.Answer
- func HasAuthor() predicate.Answer
- func HasAuthorWith(preds ...predicate.User) predicate.Answer
- func HasQuestion() predicate.Answer
- func HasQuestionWith(preds ...predicate.Question) predicate.Answer
- func ID(id int) predicate.Answer
- func IDEQ(id int) predicate.Answer
- func IDGT(id int) predicate.Answer
- func IDGTE(id int) predicate.Answer
- func IDIn(ids ...int) predicate.Answer
- func IDLT(id int) predicate.Answer
- func IDLTE(id int) predicate.Answer
- func IDNEQ(id int) predicate.Answer
- func IDNotIn(ids ...int) predicate.Answer
- func Not(p predicate.Answer) predicate.Answer
- func Or(predicates ...predicate.Answer) predicate.Answer
- func ValidColumn(column string) bool
- type OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByQuestionField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the answer type in the database. Label = "answer" // FieldID holds the string denoting the id field in the database. FieldID = "id" // 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" // EdgeQuestion holds the string denoting the question edge name in mutations. EdgeQuestion = "question" // EdgeAuthor holds the string denoting the author edge name in mutations. EdgeAuthor = "author" // Table holds the table name of the answer in the database. Table = "answers" // QuestionTable is the table that holds the question relation/edge. QuestionTable = "answers" // QuestionInverseTable is the table name for the Question entity. // It exists in this package in order to avoid circular dependency with the "question" package. QuestionInverseTable = "questions" // QuestionColumn is the table column denoting the question relation/edge. QuestionColumn = "question_answers" // AuthorTable is the table that holds the author relation/edge. AuthorTable = "answers" // 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_answers" )
Variables ¶
var Columns = []string{ FieldID, FieldContent, FieldCreatedAt, }
Columns holds all SQL columns for answer fields.
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var ForeignKeys = []string{
"question_answers",
"user_answers",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "answers" 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 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 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 HasQuestion ¶
HasQuestion applies the HasEdge predicate on the "question" edge.
func HasQuestionWith ¶
HasQuestionWith applies the HasEdge predicate on the "question" 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 Answer queries.
func ByAuthorField ¶
func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
ByAuthorField orders the results by author field.
func ByContent ¶
func ByContent(opts ...sql.OrderTermOption) OrderOption
ByContent orders the results by the content 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 ByQuestionField ¶
func ByQuestionField(field string, opts ...sql.OrderTermOption) OrderOption
ByQuestionField orders the results by question field.