snippet

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the snippet type in the database.
	Label = "snippet"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSn holds the string denoting the sn field in the database.
	FieldSn = "sn"
	// FieldOwnerID holds the string denoting the owner_id field in the database.
	FieldOwnerID = "owner_id"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldFolderID holds the string denoting the folder_id field in the database.
	FieldFolderID = "folder_id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// EdgeSnippetDocs holds the string denoting the snippet_docs edge name in mutations.
	EdgeSnippetDocs = "snippet_docs"
	// EdgeSnippetTags holds the string denoting the snippet_tags edge name in mutations.
	EdgeSnippetTags = "snippet_tags"
	// Table holds the table name of the snippet in the database.
	Table = "snippets"
	// SnippetDocsTable is the table that holds the snippet_docs relation/edge.
	SnippetDocsTable = "snippet_docs"
	// SnippetDocsInverseTable is the table name for the SnippetDocument entity.
	// It exists in this package in order to avoid circular dependency with the "snippetdocument" package.
	SnippetDocsInverseTable = "snippet_docs"
	// SnippetDocsColumn is the table column denoting the snippet_docs relation/edge.
	SnippetDocsColumn = "snippet_id"
	// SnippetTagsTable is the table that holds the snippet_tags relation/edge.
	SnippetTagsTable = "snippet_tags"
	// SnippetTagsInverseTable is the table name for the SnippetTag entity.
	// It exists in this package in order to avoid circular dependency with the "snippettag" package.
	SnippetTagsInverseTable = "snippet_tags"
	// SnippetTagsColumn is the table column denoting the snippet_tags relation/edge.
	SnippetTagsColumn = "snippet_id"
)

Variables

View Source
var (
	// DefaultSn holds the default value on creation for the "sn" field.
	DefaultSn func() string
	// SnValidator is a validator for the "sn" field. It is called by the builders before save.
	SnValidator func(string) error
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
)

Columns holds all SQL columns for snippet fields.

View Source
var ForeignKeys = []string{
	"member_member_snippets",
	"snippet_folder_snippets",
}

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

Functions

func And

func And(predicates ...predicate.Snippet) predicate.Snippet

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Snippet

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Snippet

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Snippet

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Snippet

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Snippet

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Snippet

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Snippet

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Snippet

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Snippet

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func FolderID

func FolderID(v int) predicate.Snippet

FolderID applies equality check predicate on the "folder_id" field. It's identical to FolderIDEQ.

func FolderIDEQ

func FolderIDEQ(v int) predicate.Snippet

FolderIDEQ applies the EQ predicate on the "folder_id" field.

func FolderIDGT

func FolderIDGT(v int) predicate.Snippet

FolderIDGT applies the GT predicate on the "folder_id" field.

func FolderIDGTE

func FolderIDGTE(v int) predicate.Snippet

FolderIDGTE applies the GTE predicate on the "folder_id" field.

func FolderIDIn

func FolderIDIn(vs ...int) predicate.Snippet

FolderIDIn applies the In predicate on the "folder_id" field.

func FolderIDIsNil

func FolderIDIsNil() predicate.Snippet

FolderIDIsNil applies the IsNil predicate on the "folder_id" field.

func FolderIDLT

func FolderIDLT(v int) predicate.Snippet

FolderIDLT applies the LT predicate on the "folder_id" field.

func FolderIDLTE

func FolderIDLTE(v int) predicate.Snippet

FolderIDLTE applies the LTE predicate on the "folder_id" field.

func FolderIDNEQ

func FolderIDNEQ(v int) predicate.Snippet

FolderIDNEQ applies the NEQ predicate on the "folder_id" field.

func FolderIDNotIn

func FolderIDNotIn(vs ...int) predicate.Snippet

FolderIDNotIn applies the NotIn predicate on the "folder_id" field.

func FolderIDNotNil

func FolderIDNotNil() predicate.Snippet

FolderIDNotNil applies the NotNil predicate on the "folder_id" field.

func HasSnippetDocs

func HasSnippetDocs() predicate.Snippet

HasSnippetDocs applies the HasEdge predicate on the "snippet_docs" edge.

func HasSnippetDocsWith

func HasSnippetDocsWith(preds ...predicate.SnippetDocument) predicate.Snippet

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

func HasSnippetTags added in v1.0.9

func HasSnippetTags() predicate.Snippet

HasSnippetTags applies the HasEdge predicate on the "snippet_tags" edge.

func HasSnippetTagsWith added in v1.0.9

func HasSnippetTagsWith(preds ...predicate.SnippetTag) predicate.Snippet

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

func ID

func ID(id int) predicate.Snippet

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Snippet

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Snippet

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Snippet

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Snippet

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Snippet

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Snippet

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func OwnerID

func OwnerID(v int) predicate.Snippet

OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.

func OwnerIDEQ

func OwnerIDEQ(v int) predicate.Snippet

OwnerIDEQ applies the EQ predicate on the "owner_id" field.

func OwnerIDGT added in v1.0.10

func OwnerIDGT(v int) predicate.Snippet

OwnerIDGT applies the GT predicate on the "owner_id" field.

func OwnerIDGTE added in v1.0.10

func OwnerIDGTE(v int) predicate.Snippet

OwnerIDGTE applies the GTE predicate on the "owner_id" field.

func OwnerIDIn

func OwnerIDIn(vs ...int) predicate.Snippet

OwnerIDIn applies the In predicate on the "owner_id" field.

func OwnerIDLT added in v1.0.10

func OwnerIDLT(v int) predicate.Snippet

OwnerIDLT applies the LT predicate on the "owner_id" field.

func OwnerIDLTE added in v1.0.10

func OwnerIDLTE(v int) predicate.Snippet

OwnerIDLTE applies the LTE predicate on the "owner_id" field.

func OwnerIDNEQ

func OwnerIDNEQ(v int) predicate.Snippet

OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.

func OwnerIDNotIn

func OwnerIDNotIn(vs ...int) predicate.Snippet

OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.

func Sn

func Sn(v string) predicate.Snippet

Sn applies equality check predicate on the "sn" field. It's identical to SnEQ.

func SnContains

func SnContains(v string) predicate.Snippet

SnContains applies the Contains predicate on the "sn" field.

func SnContainsFold

func SnContainsFold(v string) predicate.Snippet

SnContainsFold applies the ContainsFold predicate on the "sn" field.

func SnEQ

func SnEQ(v string) predicate.Snippet

SnEQ applies the EQ predicate on the "sn" field.

func SnEqualFold

func SnEqualFold(v string) predicate.Snippet

SnEqualFold applies the EqualFold predicate on the "sn" field.

func SnGT

func SnGT(v string) predicate.Snippet

SnGT applies the GT predicate on the "sn" field.

func SnGTE

func SnGTE(v string) predicate.Snippet

SnGTE applies the GTE predicate on the "sn" field.

func SnHasPrefix

func SnHasPrefix(v string) predicate.Snippet

SnHasPrefix applies the HasPrefix predicate on the "sn" field.

func SnHasSuffix

func SnHasSuffix(v string) predicate.Snippet

SnHasSuffix applies the HasSuffix predicate on the "sn" field.

func SnIn

func SnIn(vs ...string) predicate.Snippet

SnIn applies the In predicate on the "sn" field.

func SnLT

func SnLT(v string) predicate.Snippet

SnLT applies the LT predicate on the "sn" field.

func SnLTE

func SnLTE(v string) predicate.Snippet

SnLTE applies the LTE predicate on the "sn" field.

func SnNEQ

func SnNEQ(v string) predicate.Snippet

SnNEQ applies the NEQ predicate on the "sn" field.

func SnNotIn

func SnNotIn(vs ...string) predicate.Snippet

SnNotIn applies the NotIn predicate on the "sn" field.

func Title

func Title(v string) predicate.Snippet

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Snippet

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Snippet

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Snippet

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Snippet

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Snippet

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Snippet

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Snippet

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Snippet

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Snippet

TitleIn applies the In predicate on the "title" field.

func TitleIsNil

func TitleIsNil() predicate.Snippet

TitleIsNil applies the IsNil predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Snippet

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Snippet

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Snippet

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Snippet

TitleNotIn applies the NotIn predicate on the "title" field.

func TitleNotNil

func TitleNotNil() predicate.Snippet

TitleNotNil applies the NotNil predicate on the "title" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Snippet

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Snippet

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Snippet

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Snippet

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Snippet

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Snippet

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Snippet

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Snippet

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Snippet

UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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