site

package
v0.0.0-...-5435fe0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the site type in the database.
	Label = "site"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldURL holds the string denoting the url field in the database.
	FieldURL = "url"
	// EdgeProject holds the string denoting the project edge name in mutations.
	EdgeProject = "project"
	// EdgeRepository holds the string denoting the repository edge name in mutations.
	EdgeRepository = "repository"
	// Table holds the table name of the site in the database.
	Table = "sites"
	// ProjectTable is the table that holds the project relation/edge.
	ProjectTable = "sites"
	// ProjectInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ProjectInverseTable = "projects"
	// ProjectColumn is the table column denoting the project relation/edge.
	ProjectColumn = "project_sites"
	// RepositoryTable is the table that holds the repository relation/edge.
	RepositoryTable = "sites"
	// RepositoryInverseTable is the table name for the Repository entity.
	// It exists in this package in order to avoid circular dependency with the "repository" package.
	RepositoryInverseTable = "repositories"
	// RepositoryColumn is the table column denoting the repository relation/edge.
	RepositoryColumn = "repository_sites"
)

Variables

View Source
var (
	Hooks  [1]ent.Hook
	Policy ent.Policy
	// URLValidator is a validator for the "url" field. It is called by the builders before save.
	URLValidator func(string) error
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/fogo-sh/grackdb/ent/runtime"
View Source
var Columns = []string{
	FieldID,
	FieldURL,
}

Columns holds all SQL columns for site fields.

View Source
var ForeignKeys = []string{
	"project_sites",
	"repository_sites",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "sites" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Site) predicate.Site

And groups predicates with the AND operator between them.

func HasProject

func HasProject() predicate.Site

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith

func HasProjectWith(preds ...predicate.Project) predicate.Site

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

func HasRepository

func HasRepository() predicate.Site

HasRepository applies the HasEdge predicate on the "repository" edge.

func HasRepositoryWith

func HasRepositoryWith(preds ...predicate.Repository) predicate.Site

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

func ID

func ID(id int) predicate.Site

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Site

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Site

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Site

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Site

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Site

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Site

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Site

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Site

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Site) predicate.Site

Or groups predicates with the OR operator between them.

func URL

func URL(v string) predicate.Site

URL applies equality check predicate on the "url" field. It's identical to URLEQ.

func URLContains

func URLContains(v string) predicate.Site

URLContains applies the Contains predicate on the "url" field.

func URLContainsFold

func URLContainsFold(v string) predicate.Site

URLContainsFold applies the ContainsFold predicate on the "url" field.

func URLEQ

func URLEQ(v string) predicate.Site

URLEQ applies the EQ predicate on the "url" field.

func URLEqualFold

func URLEqualFold(v string) predicate.Site

URLEqualFold applies the EqualFold predicate on the "url" field.

func URLGT

func URLGT(v string) predicate.Site

URLGT applies the GT predicate on the "url" field.

func URLGTE

func URLGTE(v string) predicate.Site

URLGTE applies the GTE predicate on the "url" field.

func URLHasPrefix

func URLHasPrefix(v string) predicate.Site

URLHasPrefix applies the HasPrefix predicate on the "url" field.

func URLHasSuffix

func URLHasSuffix(v string) predicate.Site

URLHasSuffix applies the HasSuffix predicate on the "url" field.

func URLIn

func URLIn(vs ...string) predicate.Site

URLIn applies the In predicate on the "url" field.

func URLLT

func URLLT(v string) predicate.Site

URLLT applies the LT predicate on the "url" field.

func URLLTE

func URLLTE(v string) predicate.Site

URLLTE applies the LTE predicate on the "url" field.

func URLNEQ

func URLNEQ(v string) predicate.Site

URLNEQ applies the NEQ predicate on the "url" field.

func URLNotIn

func URLNotIn(vs ...string) predicate.Site

URLNotIn applies the NotIn predicate on the "url" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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