Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Question) predicate.Question
- func Content(v string) predicate.Question
- func ContentContains(v string) predicate.Question
- func ContentContainsFold(v string) predicate.Question
- func ContentEQ(v string) predicate.Question
- func ContentEqualFold(v string) predicate.Question
- func ContentGT(v string) predicate.Question
- func ContentGTE(v string) predicate.Question
- func ContentHasPrefix(v string) predicate.Question
- func ContentHasSuffix(v string) predicate.Question
- func ContentIn(vs ...string) predicate.Question
- func ContentLT(v string) predicate.Question
- func ContentLTE(v string) predicate.Question
- func ContentNEQ(v string) predicate.Question
- func ContentNotIn(vs ...string) predicate.Question
- func CreatedAt(v time.Time) predicate.Question
- func CreatedAtEQ(v time.Time) predicate.Question
- func CreatedAtGT(v time.Time) predicate.Question
- func CreatedAtGTE(v time.Time) predicate.Question
- func CreatedAtIn(vs ...time.Time) predicate.Question
- func CreatedAtLT(v time.Time) predicate.Question
- func CreatedAtLTE(v time.Time) predicate.Question
- func CreatedAtNEQ(v time.Time) predicate.Question
- func CreatedAtNotIn(vs ...time.Time) predicate.Question
- func HasAnswers() predicate.Question
- func HasAnswersWith(preds ...predicate.Answer) predicate.Question
- func HasAuthor() predicate.Question
- func HasAuthorWith(preds ...predicate.User) predicate.Question
- func HasTags() predicate.Question
- func HasTagsWith(preds ...predicate.Tag) predicate.Question
- func ID(id int) predicate.Question
- func IDEQ(id int) predicate.Question
- func IDGT(id int) predicate.Question
- func IDGTE(id int) predicate.Question
- func IDIn(ids ...int) predicate.Question
- func IDLT(id int) predicate.Question
- func IDLTE(id int) predicate.Question
- func IDNEQ(id int) predicate.Question
- func IDNotIn(ids ...int) predicate.Question
- func Not(p predicate.Question) predicate.Question
- func Or(predicates ...predicate.Question) predicate.Question
- func Title(v string) predicate.Question
- func TitleContains(v string) predicate.Question
- func TitleContainsFold(v string) predicate.Question
- func TitleEQ(v string) predicate.Question
- func TitleEqualFold(v string) predicate.Question
- func TitleGT(v string) predicate.Question
- func TitleGTE(v string) predicate.Question
- func TitleHasPrefix(v string) predicate.Question
- func TitleHasSuffix(v string) predicate.Question
- func TitleIn(vs ...string) predicate.Question
- func TitleLT(v string) predicate.Question
- func TitleLTE(v string) predicate.Question
- func TitleNEQ(v string) predicate.Question
- func TitleNotIn(vs ...string) predicate.Question
- func ValidColumn(column string) bool
- type OrderOption
- func ByAnswers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAnswersCount(opts ...sql.OrderTermOption) 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 ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the question type in the database. Label = "question" // 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" // EdgeAnswers holds the string denoting the answers edge name in mutations. EdgeAnswers = "answers" // EdgeAuthor holds the string denoting the author edge name in mutations. EdgeAuthor = "author" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // Table holds the table name of the question in the database. Table = "questions" // AnswersTable is the table that holds the answers relation/edge. AnswersTable = "answers" // AnswersInverseTable is the table name for the Answer entity. // It exists in this package in order to avoid circular dependency with the "answer" package. AnswersInverseTable = "answers" // AnswersColumn is the table column denoting the answers relation/edge. AnswersColumn = "question_answers" // AuthorTable is the table that holds the author relation/edge. AuthorTable = "questions" // 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_questions" // TagsTable is the table that holds the tags relation/edge. The primary key declared below. TagsTable = "tag_questions" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" )
Variables ¶
var Columns = []string{ FieldID, FieldTitle, FieldContent, FieldCreatedAt, }
Columns holds all SQL columns for question fields.
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var ForeignKeys = []string{
"user_questions",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "questions" table and are not defined as standalone fields in the schema.
var ( // TagsPrimaryKey and TagsColumn2 are the table columns denoting the // primary key for the tags relation (M2M). TagsPrimaryKey = []string{"tag_id", "question_id"} )
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 HasAnswers ¶
HasAnswers applies the HasEdge predicate on the "answers" edge.
func HasAnswersWith ¶
HasAnswersWith applies the HasEdge predicate on the "answers" edge with a given conditions (other predicates).
func HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Question queries.
func ByAnswers ¶
func ByAnswers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAnswers orders the results by answers terms.
func ByAnswersCount ¶
func ByAnswersCount(opts ...sql.OrderTermOption) OrderOption
ByAnswersCount orders the results by answers count.
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 ByTags ¶
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTags orders the results by tags terms.
func ByTagsCount ¶
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
ByTagsCount orders the results by tags count.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.