perspective

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the perspective type in the database.
	Label = "perspective"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldLabels holds the string denoting the labels field in the database.
	FieldLabels = "labels"
	// FieldAnnotations holds the string denoting the annotations field in the database.
	FieldAnnotations = "annotations"
	// 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"
	// FieldStartTime holds the string denoting the start_time field in the database.
	FieldStartTime = "start_time"
	// FieldEndTime holds the string denoting the end_time field in the database.
	FieldEndTime = "end_time"
	// FieldBuiltin holds the string denoting the builtin field in the database.
	FieldBuiltin = "builtin"
	// FieldCostQueries holds the string denoting the cost_queries field in the database.
	FieldCostQueries = "cost_queries"
	// Table holds the table name of the perspective in the database.
	Table = "perspectives"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultLabels holds the default value on creation for the "labels" field.
	DefaultLabels map[string]string
	// DefaultAnnotations holds the default value on creation for the "annotations" field.
	DefaultAnnotations map[string]string
	// 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
	// StartTimeValidator is a validator for the "start_time" field. It is called by the builders before save.
	StartTimeValidator func(string) error
	// EndTimeValidator is a validator for the "end_time" field. It is called by the builders before save.
	EndTimeValidator func(string) error
	// DefaultBuiltin holds the default value on creation for the "builtin" field.
	DefaultBuiltin bool
	// DefaultCostQueries holds the default value on creation for the "cost_queries" field.
	DefaultCostQueries []types.QueryCondition
)

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/seal-io/walrus/pkg/dao/model/runtime"

Columns holds all SQL columns for perspective fields.

Functions

func And

func And(predicates ...predicate.Perspective) predicate.Perspective

And groups predicates with the AND operator between them.

func AnnotationsIsNil

func AnnotationsIsNil() predicate.Perspective

AnnotationsIsNil applies the IsNil predicate on the "annotations" field.

func AnnotationsNotNil

func AnnotationsNotNil() predicate.Perspective

AnnotationsNotNil applies the NotNil predicate on the "annotations" field.

func Builtin

func Builtin(v bool) predicate.Perspective

Builtin applies equality check predicate on the "builtin" field. It's identical to BuiltinEQ.

func BuiltinEQ

func BuiltinEQ(v bool) predicate.Perspective

BuiltinEQ applies the EQ predicate on the "builtin" field.

func BuiltinNEQ

func BuiltinNEQ(v bool) predicate.Perspective

BuiltinNEQ applies the NEQ predicate on the "builtin" field.

func CreateTime

func CreateTime(v time.Time) predicate.Perspective

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Perspective

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Perspective

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Perspective

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Perspective

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Perspective

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Perspective

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

func CreateTimeNotIn

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

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

func Description

func Description(v string) predicate.Perspective

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Perspective

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Perspective

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Perspective

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Perspective

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Perspective

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Perspective

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Perspective

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Perspective

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Perspective

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Perspective

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Perspective

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Perspective

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Perspective

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Perspective

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Perspective

DescriptionNotNil applies the NotNil predicate on the "description" field.

func EndTime

func EndTime(v string) predicate.Perspective

EndTime applies equality check predicate on the "end_time" field. It's identical to EndTimeEQ.

func EndTimeContains

func EndTimeContains(v string) predicate.Perspective

EndTimeContains applies the Contains predicate on the "end_time" field.

func EndTimeContainsFold

func EndTimeContainsFold(v string) predicate.Perspective

EndTimeContainsFold applies the ContainsFold predicate on the "end_time" field.

func EndTimeEQ

func EndTimeEQ(v string) predicate.Perspective

EndTimeEQ applies the EQ predicate on the "end_time" field.

func EndTimeEqualFold

func EndTimeEqualFold(v string) predicate.Perspective

EndTimeEqualFold applies the EqualFold predicate on the "end_time" field.

func EndTimeGT

func EndTimeGT(v string) predicate.Perspective

EndTimeGT applies the GT predicate on the "end_time" field.

func EndTimeGTE

func EndTimeGTE(v string) predicate.Perspective

EndTimeGTE applies the GTE predicate on the "end_time" field.

func EndTimeHasPrefix

func EndTimeHasPrefix(v string) predicate.Perspective

EndTimeHasPrefix applies the HasPrefix predicate on the "end_time" field.

func EndTimeHasSuffix

func EndTimeHasSuffix(v string) predicate.Perspective

EndTimeHasSuffix applies the HasSuffix predicate on the "end_time" field.

func EndTimeIn

func EndTimeIn(vs ...string) predicate.Perspective

EndTimeIn applies the In predicate on the "end_time" field.

func EndTimeLT

func EndTimeLT(v string) predicate.Perspective

EndTimeLT applies the LT predicate on the "end_time" field.

func EndTimeLTE

func EndTimeLTE(v string) predicate.Perspective

EndTimeLTE applies the LTE predicate on the "end_time" field.

func EndTimeNEQ

func EndTimeNEQ(v string) predicate.Perspective

EndTimeNEQ applies the NEQ predicate on the "end_time" field.

func EndTimeNotIn

func EndTimeNotIn(vs ...string) predicate.Perspective

EndTimeNotIn applies the NotIn predicate on the "end_time" field.

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id object.ID) predicate.Perspective

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id object.ID) predicate.Perspective

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id object.ID) predicate.Perspective

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...object.ID) predicate.Perspective

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id object.ID) predicate.Perspective

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id object.ID) predicate.Perspective

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id object.ID) predicate.Perspective

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...object.ID) predicate.Perspective

IDNotIn applies the NotIn predicate on the ID field.

func LabelsIsNil

func LabelsIsNil() predicate.Perspective

LabelsIsNil applies the IsNil predicate on the "labels" field.

func LabelsNotNil

func LabelsNotNil() predicate.Perspective

LabelsNotNil applies the NotNil predicate on the "labels" field.

func Name

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

func NameContains

func NameContains(v string) predicate.Perspective

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

func NameContainsFold

func NameContainsFold(v string) predicate.Perspective

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

func NameEQ

func NameEQ(v string) predicate.Perspective

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

func NameEqualFold

func NameEqualFold(v string) predicate.Perspective

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

func NameGT

func NameGT(v string) predicate.Perspective

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

func NameGTE

func NameGTE(v string) predicate.Perspective

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Perspective

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Perspective

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Perspective

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

func NameLTE

func NameLTE(v string) predicate.Perspective

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

func NameNEQ

func NameNEQ(v string) predicate.Perspective

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func StartTime

func StartTime(v string) predicate.Perspective

StartTime applies equality check predicate on the "start_time" field. It's identical to StartTimeEQ.

func StartTimeContains

func StartTimeContains(v string) predicate.Perspective

StartTimeContains applies the Contains predicate on the "start_time" field.

func StartTimeContainsFold

func StartTimeContainsFold(v string) predicate.Perspective

StartTimeContainsFold applies the ContainsFold predicate on the "start_time" field.

func StartTimeEQ

func StartTimeEQ(v string) predicate.Perspective

StartTimeEQ applies the EQ predicate on the "start_time" field.

func StartTimeEqualFold

func StartTimeEqualFold(v string) predicate.Perspective

StartTimeEqualFold applies the EqualFold predicate on the "start_time" field.

func StartTimeGT

func StartTimeGT(v string) predicate.Perspective

StartTimeGT applies the GT predicate on the "start_time" field.

func StartTimeGTE

func StartTimeGTE(v string) predicate.Perspective

StartTimeGTE applies the GTE predicate on the "start_time" field.

func StartTimeHasPrefix

func StartTimeHasPrefix(v string) predicate.Perspective

StartTimeHasPrefix applies the HasPrefix predicate on the "start_time" field.

func StartTimeHasSuffix

func StartTimeHasSuffix(v string) predicate.Perspective

StartTimeHasSuffix applies the HasSuffix predicate on the "start_time" field.

func StartTimeIn

func StartTimeIn(vs ...string) predicate.Perspective

StartTimeIn applies the In predicate on the "start_time" field.

func StartTimeLT

func StartTimeLT(v string) predicate.Perspective

StartTimeLT applies the LT predicate on the "start_time" field.

func StartTimeLTE

func StartTimeLTE(v string) predicate.Perspective

StartTimeLTE applies the LTE predicate on the "start_time" field.

func StartTimeNEQ

func StartTimeNEQ(v string) predicate.Perspective

StartTimeNEQ applies the NEQ predicate on the "start_time" field.

func StartTimeNotIn

func StartTimeNotIn(vs ...string) predicate.Perspective

StartTimeNotIn applies the NotIn predicate on the "start_time" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Perspective

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Perspective

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Perspective

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Perspective

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Perspective

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Perspective

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Perspective

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

func UpdateTimeNotIn

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

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

func WithoutFields

func WithoutFields(ignores ...string) []string

WithoutFields returns the fields ignored the given list.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Perspective queries.

func ByBuiltin

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

ByBuiltin orders the results by the builtin field.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByEndTime

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

ByEndTime orders the results by the end_time field.

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 ByStartTime

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

ByStartTime orders the results by the start_time field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

Jump to

Keyboard shortcuts

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