draft

package
v0.0.0-...-b6261dd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the draft type in the database.
	Label = "draft"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldHeadline holds the string denoting the headline field in the database.
	FieldHeadline = "headline"
	// EdgeDoc holds the string denoting the doc edge name in mutations.
	EdgeDoc = "doc"
	// Table holds the table name of the draft in the database.
	Table = "drafts"
	// DocTable is the table that holds the doc relation/edge.
	DocTable = "drafts"
	// DocInverseTable is the table name for the Doc entity.
	// It exists in this package in order to avoid circular dependency with the "doc" package.
	DocInverseTable = "docs"
	// DocColumn is the table column denoting the doc relation/edge.
	DocColumn = "draft_doc"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldHeadline,
}

Columns holds all SQL columns for draft fields.

View Source
var (
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var ForeignKeys = []string{
	"draft_doc",
}

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

Functions

func And

func And(predicates ...predicate.Draft) predicate.Draft

And groups predicates with the AND operator between them.

func HasDoc

func HasDoc() predicate.Draft

HasDoc applies the HasEdge predicate on the "doc" edge.

func HasDocWith

func HasDocWith(preds ...predicate.Doc) predicate.Draft

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

func Headline

func Headline(v string) predicate.Draft

Headline applies equality check predicate on the "headline" field. It's identical to HeadlineEQ.

func HeadlineContains

func HeadlineContains(v string) predicate.Draft

HeadlineContains applies the Contains predicate on the "headline" field.

func HeadlineContainsFold

func HeadlineContainsFold(v string) predicate.Draft

HeadlineContainsFold applies the ContainsFold predicate on the "headline" field.

func HeadlineEQ

func HeadlineEQ(v string) predicate.Draft

HeadlineEQ applies the EQ predicate on the "headline" field.

func HeadlineEqualFold

func HeadlineEqualFold(v string) predicate.Draft

HeadlineEqualFold applies the EqualFold predicate on the "headline" field.

func HeadlineGT

func HeadlineGT(v string) predicate.Draft

HeadlineGT applies the GT predicate on the "headline" field.

func HeadlineGTE

func HeadlineGTE(v string) predicate.Draft

HeadlineGTE applies the GTE predicate on the "headline" field.

func HeadlineHasPrefix

func HeadlineHasPrefix(v string) predicate.Draft

HeadlineHasPrefix applies the HasPrefix predicate on the "headline" field.

func HeadlineHasSuffix

func HeadlineHasSuffix(v string) predicate.Draft

HeadlineHasSuffix applies the HasSuffix predicate on the "headline" field.

func HeadlineIn

func HeadlineIn(vs ...string) predicate.Draft

HeadlineIn applies the In predicate on the "headline" field.

func HeadlineLT

func HeadlineLT(v string) predicate.Draft

HeadlineLT applies the LT predicate on the "headline" field.

func HeadlineLTE

func HeadlineLTE(v string) predicate.Draft

HeadlineLTE applies the LTE predicate on the "headline" field.

func HeadlineNEQ

func HeadlineNEQ(v string) predicate.Draft

HeadlineNEQ applies the NEQ predicate on the "headline" field.

func HeadlineNotIn

func HeadlineNotIn(vs ...string) predicate.Draft

HeadlineNotIn applies the NotIn predicate on the "headline" field.

func ID

func ID(id uuid.UUID) predicate.Draft

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Draft

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Draft

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Draft

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Draft

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Draft

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Draft

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Draft

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Draft

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.Draft) predicate.Draft

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).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Draft queries.

func ByDocField

func ByDocField(field string, opts ...sql.OrderTermOption) OrderOption

ByDocField orders the results by doc field.

func ByHeadline

func ByHeadline(opts ...sql.OrderTermOption) OrderOption

ByHeadline orders the results by the headline field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

Jump to

Keyboard shortcuts

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