model

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the model type in the database.
	Label = "model"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldModel holds the string denoting the model field in the database.
	FieldModel = "model"
	// FieldAlias holds the string denoting the alias field in the database.
	FieldAlias = "alias"
	// FieldRpm holds the string denoting the rpm field in the database.
	FieldRpm = "rpm"
	// FieldMaxTokens holds the string denoting the max_tokens field in the database.
	FieldMaxTokens = "max_tokens"
	// FieldDefault holds the string denoting the default field in the database.
	FieldDefault = "default"
	// FieldImage holds the string denoting the image field in the database.
	FieldImage = "image"
	// EdgeProvider holds the string denoting the provider edge name in mutations.
	EdgeProvider = "provider"
	// Table holds the table name of the model in the database.
	Table = "models"
	// ProviderTable is the table that holds the provider relation/edge.
	ProviderTable = "models"
	// ProviderInverseTable is the table name for the Provider entity.
	// It exists in this package in order to avoid circular dependency with the "provider" package.
	ProviderInverseTable = "providers"
	// ProviderColumn is the table column denoting the provider relation/edge.
	ProviderColumn = "provider_models"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// ModelValidator is a validator for the "model" field. It is called by the builders before save.
	ModelValidator func(string) error
	// DefaultDefault holds the default value on creation for the "default" field.
	DefaultDefault bool
	// DefaultImage holds the default value on creation for the "image" field.
	DefaultImage bool
)

Columns holds all SQL columns for model fields.

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

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

Functions

func Alias

func Alias(v string) predicate.Model

Alias applies equality check predicate on the "alias" field. It's identical to AliasEQ.

func AliasContains

func AliasContains(v string) predicate.Model

AliasContains applies the Contains predicate on the "alias" field.

func AliasContainsFold

func AliasContainsFold(v string) predicate.Model

AliasContainsFold applies the ContainsFold predicate on the "alias" field.

func AliasEQ

func AliasEQ(v string) predicate.Model

AliasEQ applies the EQ predicate on the "alias" field.

func AliasEqualFold

func AliasEqualFold(v string) predicate.Model

AliasEqualFold applies the EqualFold predicate on the "alias" field.

func AliasGT

func AliasGT(v string) predicate.Model

AliasGT applies the GT predicate on the "alias" field.

func AliasGTE

func AliasGTE(v string) predicate.Model

AliasGTE applies the GTE predicate on the "alias" field.

func AliasHasPrefix

func AliasHasPrefix(v string) predicate.Model

AliasHasPrefix applies the HasPrefix predicate on the "alias" field.

func AliasHasSuffix

func AliasHasSuffix(v string) predicate.Model

AliasHasSuffix applies the HasSuffix predicate on the "alias" field.

func AliasIn

func AliasIn(vs ...string) predicate.Model

AliasIn applies the In predicate on the "alias" field.

func AliasIsNil

func AliasIsNil() predicate.Model

AliasIsNil applies the IsNil predicate on the "alias" field.

func AliasLT

func AliasLT(v string) predicate.Model

AliasLT applies the LT predicate on the "alias" field.

func AliasLTE

func AliasLTE(v string) predicate.Model

AliasLTE applies the LTE predicate on the "alias" field.

func AliasNEQ

func AliasNEQ(v string) predicate.Model

AliasNEQ applies the NEQ predicate on the "alias" field.

func AliasNotIn

func AliasNotIn(vs ...string) predicate.Model

AliasNotIn applies the NotIn predicate on the "alias" field.

func AliasNotNil

func AliasNotNil() predicate.Model

AliasNotNil applies the NotNil predicate on the "alias" field.

func And

func And(predicates ...predicate.Model) predicate.Model

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Model

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Model

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Model

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Model

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Model

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtIsNil

func CreatedAtIsNil() predicate.Model

CreatedAtIsNil applies the IsNil predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Model

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Model

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Model

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Model

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CreatedAtNotNil

func CreatedAtNotNil() predicate.Model

CreatedAtNotNil applies the NotNil predicate on the "created_at" field.

func Default

func Default(v bool) predicate.Model

Default applies equality check predicate on the "default" field. It's identical to DefaultEQ.

func DefaultEQ

func DefaultEQ(v bool) predicate.Model

DefaultEQ applies the EQ predicate on the "default" field.

func DefaultNEQ

func DefaultNEQ(v bool) predicate.Model

DefaultNEQ applies the NEQ predicate on the "default" field.

func HasProvider

func HasProvider() predicate.Model

HasProvider applies the HasEdge predicate on the "provider" edge.

func HasProviderWith

func HasProviderWith(preds ...predicate.Provider) predicate.Model

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

func ID

func ID(id int) predicate.Model

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Model

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Model

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Model

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Model

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Model

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Model

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Image

func Image(v bool) predicate.Model

Image applies equality check predicate on the "image" field. It's identical to ImageEQ.

func ImageEQ

func ImageEQ(v bool) predicate.Model

ImageEQ applies the EQ predicate on the "image" field.

func ImageNEQ

func ImageNEQ(v bool) predicate.Model

ImageNEQ applies the NEQ predicate on the "image" field.

func MaxTokens

func MaxTokens(v int) predicate.Model

MaxTokens applies equality check predicate on the "max_tokens" field. It's identical to MaxTokensEQ.

func MaxTokensEQ

func MaxTokensEQ(v int) predicate.Model

MaxTokensEQ applies the EQ predicate on the "max_tokens" field.

func MaxTokensGT

func MaxTokensGT(v int) predicate.Model

MaxTokensGT applies the GT predicate on the "max_tokens" field.

func MaxTokensGTE

func MaxTokensGTE(v int) predicate.Model

MaxTokensGTE applies the GTE predicate on the "max_tokens" field.

func MaxTokensIn

func MaxTokensIn(vs ...int) predicate.Model

MaxTokensIn applies the In predicate on the "max_tokens" field.

func MaxTokensIsNil

func MaxTokensIsNil() predicate.Model

MaxTokensIsNil applies the IsNil predicate on the "max_tokens" field.

func MaxTokensLT

func MaxTokensLT(v int) predicate.Model

MaxTokensLT applies the LT predicate on the "max_tokens" field.

func MaxTokensLTE

func MaxTokensLTE(v int) predicate.Model

MaxTokensLTE applies the LTE predicate on the "max_tokens" field.

func MaxTokensNEQ

func MaxTokensNEQ(v int) predicate.Model

MaxTokensNEQ applies the NEQ predicate on the "max_tokens" field.

func MaxTokensNotIn

func MaxTokensNotIn(vs ...int) predicate.Model

MaxTokensNotIn applies the NotIn predicate on the "max_tokens" field.

func MaxTokensNotNil

func MaxTokensNotNil() predicate.Model

MaxTokensNotNil applies the NotNil predicate on the "max_tokens" field.

func Model

func Model(v string) predicate.Model

Model applies equality check predicate on the "model" field. It's identical to ModelEQ.

func ModelContains

func ModelContains(v string) predicate.Model

ModelContains applies the Contains predicate on the "model" field.

func ModelContainsFold

func ModelContainsFold(v string) predicate.Model

ModelContainsFold applies the ContainsFold predicate on the "model" field.

func ModelEQ

func ModelEQ(v string) predicate.Model

ModelEQ applies the EQ predicate on the "model" field.

func ModelEqualFold

func ModelEqualFold(v string) predicate.Model

ModelEqualFold applies the EqualFold predicate on the "model" field.

func ModelGT

func ModelGT(v string) predicate.Model

ModelGT applies the GT predicate on the "model" field.

func ModelGTE

func ModelGTE(v string) predicate.Model

ModelGTE applies the GTE predicate on the "model" field.

func ModelHasPrefix

func ModelHasPrefix(v string) predicate.Model

ModelHasPrefix applies the HasPrefix predicate on the "model" field.

func ModelHasSuffix

func ModelHasSuffix(v string) predicate.Model

ModelHasSuffix applies the HasSuffix predicate on the "model" field.

func ModelIn

func ModelIn(vs ...string) predicate.Model

ModelIn applies the In predicate on the "model" field.

func ModelLT

func ModelLT(v string) predicate.Model

ModelLT applies the LT predicate on the "model" field.

func ModelLTE

func ModelLTE(v string) predicate.Model

ModelLTE applies the LTE predicate on the "model" field.

func ModelNEQ

func ModelNEQ(v string) predicate.Model

ModelNEQ applies the NEQ predicate on the "model" field.

func ModelNotIn

func ModelNotIn(vs ...string) predicate.Model

ModelNotIn applies the NotIn predicate on the "model" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Model) predicate.Model

Or groups predicates with the OR operator between them.

func Rpm

func Rpm(v int) predicate.Model

Rpm applies equality check predicate on the "rpm" field. It's identical to RpmEQ.

func RpmEQ

func RpmEQ(v int) predicate.Model

RpmEQ applies the EQ predicate on the "rpm" field.

func RpmGT

func RpmGT(v int) predicate.Model

RpmGT applies the GT predicate on the "rpm" field.

func RpmGTE

func RpmGTE(v int) predicate.Model

RpmGTE applies the GTE predicate on the "rpm" field.

func RpmIn

func RpmIn(vs ...int) predicate.Model

RpmIn applies the In predicate on the "rpm" field.

func RpmIsNil

func RpmIsNil() predicate.Model

RpmIsNil applies the IsNil predicate on the "rpm" field.

func RpmLT

func RpmLT(v int) predicate.Model

RpmLT applies the LT predicate on the "rpm" field.

func RpmLTE

func RpmLTE(v int) predicate.Model

RpmLTE applies the LTE predicate on the "rpm" field.

func RpmNEQ

func RpmNEQ(v int) predicate.Model

RpmNEQ applies the NEQ predicate on the "rpm" field.

func RpmNotIn

func RpmNotIn(vs ...int) predicate.Model

RpmNotIn applies the NotIn predicate on the "rpm" field.

func RpmNotNil

func RpmNotNil() predicate.Model

RpmNotNil applies the NotNil predicate on the "rpm" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Model

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Model

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Model

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Model

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Model

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.Model

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Model

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Model

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Model

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Model

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.Model

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

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 Model queries.

func ByAlias

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

ByAlias orders the results by the alias field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDefault

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

ByDefault orders the results by the default field.

func ByID

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

ByID orders the results by the id field.

func ByImage

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

ByImage orders the results by the image field.

func ByMaxTokens

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

ByMaxTokens orders the results by the max_tokens field.

func ByModel

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

ByModel orders the results by the model field.

func ByProviderField

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

ByProviderField orders the results by provider field.

func ByRpm

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

ByRpm orders the results by the rpm field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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