Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Document) predicate.Document
- func CreatedAt(v time.Time) predicate.Document
- func CreatedAtEQ(v time.Time) predicate.Document
- func CreatedAtGT(v time.Time) predicate.Document
- func CreatedAtGTE(v time.Time) predicate.Document
- func CreatedAtIn(vs ...time.Time) predicate.Document
- func CreatedAtLT(v time.Time) predicate.Document
- func CreatedAtLTE(v time.Time) predicate.Document
- func CreatedAtNEQ(v time.Time) predicate.Document
- func CreatedAtNotIn(vs ...time.Time) predicate.Document
- func HasAttachments() predicate.Document
- func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Document
- func HasGroup() predicate.Document
- func HasGroupWith(preds ...predicate.Group) predicate.Document
- func ID(id uuid.UUID) predicate.Document
- func IDEQ(id uuid.UUID) predicate.Document
- func IDGT(id uuid.UUID) predicate.Document
- func IDGTE(id uuid.UUID) predicate.Document
- func IDIn(ids ...uuid.UUID) predicate.Document
- func IDLT(id uuid.UUID) predicate.Document
- func IDLTE(id uuid.UUID) predicate.Document
- func IDNEQ(id uuid.UUID) predicate.Document
- func IDNotIn(ids ...uuid.UUID) predicate.Document
- func Not(p predicate.Document) predicate.Document
- func Or(predicates ...predicate.Document) predicate.Document
- func Path(v string) predicate.Document
- func PathContains(v string) predicate.Document
- func PathContainsFold(v string) predicate.Document
- func PathEQ(v string) predicate.Document
- func PathEqualFold(v string) predicate.Document
- func PathGT(v string) predicate.Document
- func PathGTE(v string) predicate.Document
- func PathHasPrefix(v string) predicate.Document
- func PathHasSuffix(v string) predicate.Document
- func PathIn(vs ...string) predicate.Document
- func PathLT(v string) predicate.Document
- func PathLTE(v string) predicate.Document
- func PathNEQ(v string) predicate.Document
- func PathNotIn(vs ...string) predicate.Document
- func Title(v string) predicate.Document
- func TitleContains(v string) predicate.Document
- func TitleContainsFold(v string) predicate.Document
- func TitleEQ(v string) predicate.Document
- func TitleEqualFold(v string) predicate.Document
- func TitleGT(v string) predicate.Document
- func TitleGTE(v string) predicate.Document
- func TitleHasPrefix(v string) predicate.Document
- func TitleHasSuffix(v string) predicate.Document
- func TitleIn(vs ...string) predicate.Document
- func TitleLT(v string) predicate.Document
- func TitleLTE(v string) predicate.Document
- func TitleNEQ(v string) predicate.Document
- func TitleNotIn(vs ...string) predicate.Document
- func UpdatedAt(v time.Time) predicate.Document
- func UpdatedAtEQ(v time.Time) predicate.Document
- func UpdatedAtGT(v time.Time) predicate.Document
- func UpdatedAtGTE(v time.Time) predicate.Document
- func UpdatedAtIn(vs ...time.Time) predicate.Document
- func UpdatedAtLT(v time.Time) predicate.Document
- func UpdatedAtLTE(v time.Time) predicate.Document
- func UpdatedAtNEQ(v time.Time) predicate.Document
- func UpdatedAtNotIn(vs ...time.Time) predicate.Document
- func ValidColumn(column string) bool
- type OrderOption
- func ByAttachments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAttachmentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPath(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the document type in the database. Label = "document" // FieldID holds the string denoting the id field in the database. FieldID = "id" // 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" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldPath holds the string denoting the path field in the database. FieldPath = "path" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // EdgeAttachments holds the string denoting the attachments edge name in mutations. EdgeAttachments = "attachments" // Table holds the table name of the document in the database. Table = "documents" // GroupTable is the table that holds the group relation/edge. GroupTable = "documents" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_documents" // AttachmentsTable is the table that holds the attachments relation/edge. AttachmentsTable = "attachments" // AttachmentsInverseTable is the table name for the Attachment entity. // It exists in this package in order to avoid circular dependency with the "attachment" package. AttachmentsInverseTable = "attachments" // AttachmentsColumn is the table column denoting the attachments relation/edge. AttachmentsColumn = "document_attachments" )
Variables ¶
var ( // 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 // TitleValidator is a validator for the "title" field. It is called by the builders before save. TitleValidator func(string) error // PathValidator is a validator for the "path" field. It is called by the builders before save. PathValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldTitle, FieldPath, }
Columns holds all SQL columns for document fields.
var ForeignKeys = []string{
"group_documents",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "documents" table and are not defined as standalone fields in the schema.
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 HasAttachments ¶
HasAttachments applies the HasEdge predicate on the "attachments" edge.
func HasAttachmentsWith ¶
func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Document
HasAttachmentsWith applies the HasEdge predicate on the "attachments" edge with a given conditions (other predicates).
func HasGroupWith ¶
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func PathContains ¶
PathContains applies the Contains predicate on the "path" field.
func PathContainsFold ¶
PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathEqualFold ¶
PathEqualFold applies the EqualFold predicate on the "path" field.
func PathHasPrefix ¶
PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasSuffix ¶
PathHasSuffix applies the HasSuffix predicate on the "path" field.
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 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 Document queries.
func ByAttachments ¶
func ByAttachments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAttachments orders the results by attachments terms.
func ByAttachmentsCount ¶
func ByAttachmentsCount(opts ...sql.OrderTermOption) OrderOption
ByAttachmentsCount orders the results by attachments count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPath ¶
func ByPath(opts ...sql.OrderTermOption) OrderOption
ByPath orders the results by the path field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.