Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Metadata) predicate.Metadata
- func Comment(v string) predicate.Metadata
- func CommentContains(v string) predicate.Metadata
- func CommentContainsFold(v string) predicate.Metadata
- func CommentEQ(v string) predicate.Metadata
- func CommentEqualFold(v string) predicate.Metadata
- func CommentGT(v string) predicate.Metadata
- func CommentGTE(v string) predicate.Metadata
- func CommentHasPrefix(v string) predicate.Metadata
- func CommentHasSuffix(v string) predicate.Metadata
- func CommentIn(vs ...string) predicate.Metadata
- func CommentLT(v string) predicate.Metadata
- func CommentLTE(v string) predicate.Metadata
- func CommentNEQ(v string) predicate.Metadata
- func CommentNotIn(vs ...string) predicate.Metadata
- func Date(v time.Time) predicate.Metadata
- func DateEQ(v time.Time) predicate.Metadata
- func DateGT(v time.Time) predicate.Metadata
- func DateGTE(v time.Time) predicate.Metadata
- func DateIn(vs ...time.Time) predicate.Metadata
- func DateLT(v time.Time) predicate.Metadata
- func DateLTE(v time.Time) predicate.Metadata
- func DateNEQ(v time.Time) predicate.Metadata
- func DateNotIn(vs ...time.Time) predicate.Metadata
- func HasAuthors() predicate.Metadata
- func HasAuthorsWith(preds ...predicate.Person) predicate.Metadata
- func HasDocument() predicate.Metadata
- func HasDocumentTypes() predicate.Metadata
- func HasDocumentTypesWith(preds ...predicate.DocumentType) predicate.Metadata
- func HasDocumentWith(preds ...predicate.Document) predicate.Metadata
- func HasTools() predicate.Metadata
- func HasToolsWith(preds ...predicate.Tool) predicate.Metadata
- func ID(id string) predicate.Metadata
- func IDContainsFold(id string) predicate.Metadata
- func IDEQ(id string) predicate.Metadata
- func IDEqualFold(id string) predicate.Metadata
- func IDGT(id string) predicate.Metadata
- func IDGTE(id string) predicate.Metadata
- func IDIn(ids ...string) predicate.Metadata
- func IDLT(id string) predicate.Metadata
- func IDLTE(id string) predicate.Metadata
- func IDNEQ(id string) predicate.Metadata
- func IDNotIn(ids ...string) predicate.Metadata
- func Name(v string) predicate.Metadata
- func NameContains(v string) predicate.Metadata
- func NameContainsFold(v string) predicate.Metadata
- func NameEQ(v string) predicate.Metadata
- func NameEqualFold(v string) predicate.Metadata
- func NameGT(v string) predicate.Metadata
- func NameGTE(v string) predicate.Metadata
- func NameHasPrefix(v string) predicate.Metadata
- func NameHasSuffix(v string) predicate.Metadata
- func NameIn(vs ...string) predicate.Metadata
- func NameLT(v string) predicate.Metadata
- func NameLTE(v string) predicate.Metadata
- func NameNEQ(v string) predicate.Metadata
- func NameNotIn(vs ...string) predicate.Metadata
- func Not(p predicate.Metadata) predicate.Metadata
- func Or(predicates ...predicate.Metadata) predicate.Metadata
- func ValidColumn(column string) bool
- func Version(v string) predicate.Metadata
- func VersionContains(v string) predicate.Metadata
- func VersionContainsFold(v string) predicate.Metadata
- func VersionEQ(v string) predicate.Metadata
- func VersionEqualFold(v string) predicate.Metadata
- func VersionGT(v string) predicate.Metadata
- func VersionGTE(v string) predicate.Metadata
- func VersionHasPrefix(v string) predicate.Metadata
- func VersionHasSuffix(v string) predicate.Metadata
- func VersionIn(vs ...string) predicate.Metadata
- func VersionLT(v string) predicate.Metadata
- func VersionLTE(v string) predicate.Metadata
- func VersionNEQ(v string) predicate.Metadata
- func VersionNotIn(vs ...string) predicate.Metadata
- type OrderOption
- func ByAuthors(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAuthorsCount(opts ...sql.OrderTermOption) OrderOption
- func ByComment(opts ...sql.OrderTermOption) OrderOption
- func ByDate(opts ...sql.OrderTermOption) OrderOption
- func ByDocumentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByDocumentTypes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentTypesCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByTools(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByToolsCount(opts ...sql.OrderTermOption) OrderOption
- func ByVersion(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the metadata type in the database. Label = "metadata" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldVersion holds the string denoting the version field in the database. FieldVersion = "version" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDate holds the string denoting the date field in the database. FieldDate = "date" // FieldComment holds the string denoting the comment field in the database. FieldComment = "comment" // EdgeTools holds the string denoting the tools edge name in mutations. EdgeTools = "tools" // EdgeAuthors holds the string denoting the authors edge name in mutations. EdgeAuthors = "authors" // EdgeDocumentTypes holds the string denoting the document_types edge name in mutations. EdgeDocumentTypes = "document_types" // EdgeDocument holds the string denoting the document edge name in mutations. EdgeDocument = "document" // Table holds the table name of the metadata in the database. Table = "metadata" // ToolsTable is the table that holds the tools relation/edge. ToolsTable = "tools" // ToolsInverseTable is the table name for the Tool entity. // It exists in this package in order to avoid circular dependency with the "tool" package. ToolsInverseTable = "tools" // ToolsColumn is the table column denoting the tools relation/edge. ToolsColumn = "metadata_id" // AuthorsTable is the table that holds the authors relation/edge. AuthorsTable = "persons" // AuthorsInverseTable is the table name for the Person entity. // It exists in this package in order to avoid circular dependency with the "person" package. AuthorsInverseTable = "persons" // AuthorsColumn is the table column denoting the authors relation/edge. AuthorsColumn = "metadata_id" // DocumentTypesTable is the table that holds the document_types relation/edge. DocumentTypesTable = "document_types" // DocumentTypesInverseTable is the table name for the DocumentType entity. // It exists in this package in order to avoid circular dependency with the "documenttype" package. DocumentTypesInverseTable = "document_types" // DocumentTypesColumn is the table column denoting the document_types relation/edge. DocumentTypesColumn = "metadata_id" // DocumentTable is the table that holds the document relation/edge. DocumentTable = "metadata" // DocumentInverseTable is the table name for the Document entity. // It exists in this package in order to avoid circular dependency with the "document" package. DocumentInverseTable = "documents" // DocumentColumn is the table column denoting the document relation/edge. DocumentColumn = "id" )
Variables ¶
var Columns = []string{ FieldID, FieldVersion, FieldName, FieldDate, FieldComment, }
Columns holds all SQL columns for metadata fields.
var ( // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
Functions ¶
func Comment ¶
Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.
func CommentContains ¶
CommentContains applies the Contains predicate on the "comment" field.
func CommentContainsFold ¶
CommentContainsFold applies the ContainsFold predicate on the "comment" field.
func CommentEqualFold ¶
CommentEqualFold applies the EqualFold predicate on the "comment" field.
func CommentGTE ¶
CommentGTE applies the GTE predicate on the "comment" field.
func CommentHasPrefix ¶
CommentHasPrefix applies the HasPrefix predicate on the "comment" field.
func CommentHasSuffix ¶
CommentHasSuffix applies the HasSuffix predicate on the "comment" field.
func CommentLTE ¶
CommentLTE applies the LTE predicate on the "comment" field.
func CommentNEQ ¶
CommentNEQ applies the NEQ predicate on the "comment" field.
func CommentNotIn ¶
CommentNotIn applies the NotIn predicate on the "comment" field.
func HasAuthors ¶
HasAuthors applies the HasEdge predicate on the "authors" edge.
func HasAuthorsWith ¶
HasAuthorsWith applies the HasEdge predicate on the "authors" edge with a given conditions (other predicates).
func HasDocument ¶
HasDocument applies the HasEdge predicate on the "document" edge.
func HasDocumentTypes ¶
HasDocumentTypes applies the HasEdge predicate on the "document_types" edge.
func HasDocumentTypesWith ¶
func HasDocumentTypesWith(preds ...predicate.DocumentType) predicate.Metadata
HasDocumentTypesWith applies the HasEdge predicate on the "document_types" edge with a given conditions (other predicates).
func HasDocumentWith ¶
HasDocumentWith applies the HasEdge predicate on the "document" edge with a given conditions (other predicates).
func HasToolsWith ¶
HasToolsWith applies the HasEdge predicate on the "tools" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Version ¶
Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
func VersionContains ¶
VersionContains applies the Contains predicate on the "version" field.
func VersionContainsFold ¶
VersionContainsFold applies the ContainsFold predicate on the "version" field.
func VersionEqualFold ¶
VersionEqualFold applies the EqualFold predicate on the "version" field.
func VersionGTE ¶
VersionGTE applies the GTE predicate on the "version" field.
func VersionHasPrefix ¶
VersionHasPrefix applies the HasPrefix predicate on the "version" field.
func VersionHasSuffix ¶
VersionHasSuffix applies the HasSuffix predicate on the "version" field.
func VersionLTE ¶
VersionLTE applies the LTE predicate on the "version" field.
func VersionNEQ ¶
VersionNEQ applies the NEQ predicate on the "version" field.
func VersionNotIn ¶
VersionNotIn applies the NotIn predicate on the "version" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Metadata queries.
func ByAuthors ¶
func ByAuthors(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAuthors orders the results by authors terms.
func ByAuthorsCount ¶
func ByAuthorsCount(opts ...sql.OrderTermOption) OrderOption
ByAuthorsCount orders the results by authors count.
func ByComment ¶
func ByComment(opts ...sql.OrderTermOption) OrderOption
ByComment orders the results by the comment field.
func ByDate ¶
func ByDate(opts ...sql.OrderTermOption) OrderOption
ByDate orders the results by the date field.
func ByDocumentField ¶
func ByDocumentField(field string, opts ...sql.OrderTermOption) OrderOption
ByDocumentField orders the results by document field.
func ByDocumentTypes ¶
func ByDocumentTypes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDocumentTypes orders the results by document_types terms.
func ByDocumentTypesCount ¶
func ByDocumentTypesCount(opts ...sql.OrderTermOption) OrderOption
ByDocumentTypesCount orders the results by document_types count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByTools ¶
func ByTools(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTools orders the results by tools terms.
func ByToolsCount ¶
func ByToolsCount(opts ...sql.OrderTermOption) OrderOption
ByToolsCount orders the results by tools count.
func ByVersion ¶
func ByVersion(opts ...sql.OrderTermOption) OrderOption
ByVersion orders the results by the version field.