metadata

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

Columns holds all SQL columns for metadata fields.

View Source
var (
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Metadata) predicate.Metadata

And groups predicates with the AND operator between them.

func Comment

func Comment(v string) predicate.Metadata

Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.

func CommentContains

func CommentContains(v string) predicate.Metadata

CommentContains applies the Contains predicate on the "comment" field.

func CommentContainsFold

func CommentContainsFold(v string) predicate.Metadata

CommentContainsFold applies the ContainsFold predicate on the "comment" field.

func CommentEQ

func CommentEQ(v string) predicate.Metadata

CommentEQ applies the EQ predicate on the "comment" field.

func CommentEqualFold

func CommentEqualFold(v string) predicate.Metadata

CommentEqualFold applies the EqualFold predicate on the "comment" field.

func CommentGT

func CommentGT(v string) predicate.Metadata

CommentGT applies the GT predicate on the "comment" field.

func CommentGTE

func CommentGTE(v string) predicate.Metadata

CommentGTE applies the GTE predicate on the "comment" field.

func CommentHasPrefix

func CommentHasPrefix(v string) predicate.Metadata

CommentHasPrefix applies the HasPrefix predicate on the "comment" field.

func CommentHasSuffix

func CommentHasSuffix(v string) predicate.Metadata

CommentHasSuffix applies the HasSuffix predicate on the "comment" field.

func CommentIn

func CommentIn(vs ...string) predicate.Metadata

CommentIn applies the In predicate on the "comment" field.

func CommentLT

func CommentLT(v string) predicate.Metadata

CommentLT applies the LT predicate on the "comment" field.

func CommentLTE

func CommentLTE(v string) predicate.Metadata

CommentLTE applies the LTE predicate on the "comment" field.

func CommentNEQ

func CommentNEQ(v string) predicate.Metadata

CommentNEQ applies the NEQ predicate on the "comment" field.

func CommentNotIn

func CommentNotIn(vs ...string) predicate.Metadata

CommentNotIn applies the NotIn predicate on the "comment" field.

func Date

func Date(v time.Time) predicate.Metadata

Date applies equality check predicate on the "date" field. It's identical to DateEQ.

func DateEQ

func DateEQ(v time.Time) predicate.Metadata

DateEQ applies the EQ predicate on the "date" field.

func DateGT

func DateGT(v time.Time) predicate.Metadata

DateGT applies the GT predicate on the "date" field.

func DateGTE

func DateGTE(v time.Time) predicate.Metadata

DateGTE applies the GTE predicate on the "date" field.

func DateIn

func DateIn(vs ...time.Time) predicate.Metadata

DateIn applies the In predicate on the "date" field.

func DateLT

func DateLT(v time.Time) predicate.Metadata

DateLT applies the LT predicate on the "date" field.

func DateLTE

func DateLTE(v time.Time) predicate.Metadata

DateLTE applies the LTE predicate on the "date" field.

func DateNEQ

func DateNEQ(v time.Time) predicate.Metadata

DateNEQ applies the NEQ predicate on the "date" field.

func DateNotIn

func DateNotIn(vs ...time.Time) predicate.Metadata

DateNotIn applies the NotIn predicate on the "date" field.

func HasAuthors

func HasAuthors() predicate.Metadata

HasAuthors applies the HasEdge predicate on the "authors" edge.

func HasAuthorsWith

func HasAuthorsWith(preds ...predicate.Person) predicate.Metadata

HasAuthorsWith applies the HasEdge predicate on the "authors" edge with a given conditions (other predicates).

func HasDocument

func HasDocument() predicate.Metadata

HasDocument applies the HasEdge predicate on the "document" edge.

func HasDocumentTypes

func HasDocumentTypes() predicate.Metadata

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

func HasDocumentWith(preds ...predicate.Document) predicate.Metadata

HasDocumentWith applies the HasEdge predicate on the "document" edge with a given conditions (other predicates).

func HasTools

func HasTools() predicate.Metadata

HasTools applies the HasEdge predicate on the "tools" edge.

func HasToolsWith

func HasToolsWith(preds ...predicate.Tool) predicate.Metadata

HasToolsWith applies the HasEdge predicate on the "tools" edge with a given conditions (other predicates).

func ID

func ID(id string) predicate.Metadata

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Metadata

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Metadata

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Metadata

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Metadata

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Metadata

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Metadata

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Metadata

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Metadata

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Metadata

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Metadata

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Metadata

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Metadata

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Metadata

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Metadata

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Metadata

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Metadata

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Metadata

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Metadata

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Metadata

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Metadata

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Metadata

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Metadata

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Metadata

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Metadata

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Metadata) predicate.Metadata

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Version

func Version(v string) predicate.Metadata

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionContains

func VersionContains(v string) predicate.Metadata

VersionContains applies the Contains predicate on the "version" field.

func VersionContainsFold

func VersionContainsFold(v string) predicate.Metadata

VersionContainsFold applies the ContainsFold predicate on the "version" field.

func VersionEQ

func VersionEQ(v string) predicate.Metadata

VersionEQ applies the EQ predicate on the "version" field.

func VersionEqualFold

func VersionEqualFold(v string) predicate.Metadata

VersionEqualFold applies the EqualFold predicate on the "version" field.

func VersionGT

func VersionGT(v string) predicate.Metadata

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v string) predicate.Metadata

VersionGTE applies the GTE predicate on the "version" field.

func VersionHasPrefix

func VersionHasPrefix(v string) predicate.Metadata

VersionHasPrefix applies the HasPrefix predicate on the "version" field.

func VersionHasSuffix

func VersionHasSuffix(v string) predicate.Metadata

VersionHasSuffix applies the HasSuffix predicate on the "version" field.

func VersionIn

func VersionIn(vs ...string) predicate.Metadata

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v string) predicate.Metadata

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v string) predicate.Metadata

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v string) predicate.Metadata

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...string) predicate.Metadata

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL