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 IsAcceptedAnswer(v bool) predicate.Answer
- func IsAcceptedAnswerEQ(v bool) predicate.Answer
- func IsAcceptedAnswerNEQ(v bool) predicate.Answer
- func Likes(v int) predicate.Answer
- func LikesEQ(v int) predicate.Answer
- func LikesGT(v int) predicate.Answer
- func LikesGTE(v int) predicate.Answer
- func LikesIn(vs ...int) predicate.Answer
- func LikesLT(v int) predicate.Answer
- func LikesLTE(v int) predicate.Answer
- func LikesNEQ(v int) predicate.Answer
- func LikesNotIn(vs ...int) predicate.Answer
- func Not(p predicate.Answer) predicate.Answer
- func Or(predicates ...predicate.Answer) predicate.Answer
- func UpdatedAt(v time.Time) predicate.Answer
- func UpdatedAtEQ(v time.Time) predicate.Answer
- func UpdatedAtGT(v time.Time) predicate.Answer
- func UpdatedAtGTE(v time.Time) predicate.Answer
- func UpdatedAtIn(vs ...time.Time) predicate.Answer
- func UpdatedAtLT(v time.Time) predicate.Answer
- func UpdatedAtLTE(v time.Time) predicate.Answer
- func UpdatedAtNEQ(v time.Time) predicate.Answer
- func UpdatedAtNotIn(vs ...time.Time) 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 ByIsAcceptedAnswer(opts ...sql.OrderTermOption) OrderOption
- func ByLikes(opts ...sql.OrderTermOption) OrderOption
- func ByQuestionField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(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" // FieldLikes holds the string denoting the likes field in the database. FieldLikes = "likes" // 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" // FieldIsAcceptedAnswer holds the string denoting the is_accepted_answer field in the database. FieldIsAcceptedAnswer = "is_accepted_answer" // 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 ( // DefaultLikes holds the default value on creation for the "likes" field. DefaultLikes int // 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 // DefaultIsAcceptedAnswer holds the default value on creation for the "is_accepted_answer" field. DefaultIsAcceptedAnswer bool )
var Columns = []string{ FieldID, FieldContent, FieldLikes, FieldCreatedAt, FieldUpdatedAt, FieldIsAcceptedAnswer, }
Columns holds all SQL columns for answer fields.
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 IsAcceptedAnswer ¶
IsAcceptedAnswer applies equality check predicate on the "is_accepted_answer" field. It's identical to IsAcceptedAnswerEQ.
func IsAcceptedAnswerEQ ¶
IsAcceptedAnswerEQ applies the EQ predicate on the "is_accepted_answer" field.
func IsAcceptedAnswerNEQ ¶
IsAcceptedAnswerNEQ applies the NEQ predicate on the "is_accepted_answer" field.
func Likes ¶
Likes applies equality check predicate on the "likes" field. It's identical to LikesEQ.
func LikesNotIn ¶
LikesNotIn applies the NotIn predicate on the "likes" 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 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 ByIsAcceptedAnswer ¶
func ByIsAcceptedAnswer(opts ...sql.OrderTermOption) OrderOption
ByIsAcceptedAnswer orders the results by the is_accepted_answer field.
func ByLikes ¶
func ByLikes(opts ...sql.OrderTermOption) OrderOption
ByLikes orders the results by the likes field.
func ByQuestionField ¶
func ByQuestionField(field string, opts ...sql.OrderTermOption) OrderOption
ByQuestionField orders the results by question field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.