Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Story) predicate.Story
- func CreatedAt(v time.Time) predicate.Story
- func CreatedAtEQ(v time.Time) predicate.Story
- func CreatedAtGT(v time.Time) predicate.Story
- func CreatedAtGTE(v time.Time) predicate.Story
- func CreatedAtIn(vs ...time.Time) predicate.Story
- func CreatedAtLT(v time.Time) predicate.Story
- func CreatedAtLTE(v time.Time) predicate.Story
- func CreatedAtNEQ(v time.Time) predicate.Story
- func CreatedAtNotIn(vs ...time.Time) predicate.Story
- func HasSentences() predicate.Story
- func HasSentencesWith(preds ...predicate.Sentence) predicate.Story
- func ID(id uuid.UUID) predicate.Story
- func IDEQ(id uuid.UUID) predicate.Story
- func IDGT(id uuid.UUID) predicate.Story
- func IDGTE(id uuid.UUID) predicate.Story
- func IDIn(ids ...uuid.UUID) predicate.Story
- func IDLT(id uuid.UUID) predicate.Story
- func IDLTE(id uuid.UUID) predicate.Story
- func IDNEQ(id uuid.UUID) predicate.Story
- func IDNotIn(ids ...uuid.UUID) predicate.Story
- func Not(p predicate.Story) predicate.Story
- func Or(predicates ...predicate.Story) predicate.Story
- func StatusEQ(v Status) predicate.Story
- func StatusIn(vs ...Status) predicate.Story
- func StatusNEQ(v Status) predicate.Story
- func StatusNotIn(vs ...Status) predicate.Story
- func StatusValidator(s Status) error
- func UpdatedAt(v time.Time) predicate.Story
- func UpdatedAtEQ(v time.Time) predicate.Story
- func UpdatedAtGT(v time.Time) predicate.Story
- func UpdatedAtGTE(v time.Time) predicate.Story
- func UpdatedAtIn(vs ...time.Time) predicate.Story
- func UpdatedAtLT(v time.Time) predicate.Story
- func UpdatedAtLTE(v time.Time) predicate.Story
- func UpdatedAtNEQ(v time.Time) predicate.Story
- func UpdatedAtNotIn(vs ...time.Time) predicate.Story
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func BySentences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySentencesCount(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Status
Constants ¶
const ( // Label holds the string label denoting the story type in the database. Label = "story" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // 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" // EdgeSentences holds the string denoting the sentences edge name in mutations. EdgeSentences = "sentences" // Table holds the table name of the story in the database. Table = "stories" // SentencesTable is the table that holds the sentences relation/edge. SentencesTable = "sentences" // SentencesInverseTable is the table name for the Sentence entity. // It exists in this package in order to avoid circular dependency with the "sentence" package. SentencesInverseTable = "sentences" // SentencesColumn is the table column denoting the sentences relation/edge. SentencesColumn = "story_sentences" )
const DefaultStatus = StatusOpen
StatusOpen is the default value of the Status enum.
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt 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, FieldStatus, FieldCreatedAt, FieldUpdatedAt, }
Columns holds all SQL columns for story fields.
Functions ¶
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 HasSentences ¶
HasSentences applies the HasEdge predicate on the "sentences" edge.
func HasSentencesWith ¶
HasSentencesWith applies the HasEdge predicate on the "sentences" edge with a given conditions (other predicates).
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
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 Story queries.
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 BySentences ¶
func BySentences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySentences orders the results by sentences terms.
func BySentencesCount ¶
func BySentencesCount(opts ...sql.OrderTermOption) OrderOption
BySentencesCount orders the results by sentences count.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.