learning

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the learning type in the database.
	Label = "learning"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTrigger holds the string denoting the trigger field in the database.
	FieldTrigger = "trigger"
	// FieldErrorPattern holds the string denoting the error_pattern field in the database.
	FieldErrorPattern = "error_pattern"
	// FieldDiagnosis holds the string denoting the diagnosis field in the database.
	FieldDiagnosis = "diagnosis"
	// FieldFix holds the string denoting the fix field in the database.
	FieldFix = "fix"
	// FieldCategory holds the string denoting the category field in the database.
	FieldCategory = "category"
	// FieldTags holds the string denoting the tags field in the database.
	FieldTags = "tags"
	// FieldOccurrenceCount holds the string denoting the occurrence_count field in the database.
	FieldOccurrenceCount = "occurrence_count"
	// FieldSuccessCount holds the string denoting the success_count field in the database.
	FieldSuccessCount = "success_count"
	// FieldConfidence holds the string denoting the confidence field in the database.
	FieldConfidence = "confidence"
	// 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"
	// Table holds the table name of the learning in the database.
	Table = "learnings"
)

Variables

View Source
var (
	// TriggerValidator is a validator for the "trigger" field. It is called by the builders before save.
	TriggerValidator func(string) error
	// DefaultOccurrenceCount holds the default value on creation for the "occurrence_count" field.
	DefaultOccurrenceCount int
	// DefaultSuccessCount holds the default value on creation for the "success_count" field.
	DefaultSuccessCount int
	// DefaultConfidence holds the default value on creation for the "confidence" field.
	DefaultConfidence float64
	// 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for learning fields.

Functions

func And

func And(predicates ...predicate.Learning) predicate.Learning

And groups predicates with the AND operator between them.

func CategoryEQ

func CategoryEQ(v Category) predicate.Learning

CategoryEQ applies the EQ predicate on the "category" field.

func CategoryIn

func CategoryIn(vs ...Category) predicate.Learning

CategoryIn applies the In predicate on the "category" field.

func CategoryNEQ

func CategoryNEQ(v Category) predicate.Learning

CategoryNEQ applies the NEQ predicate on the "category" field.

func CategoryNotIn

func CategoryNotIn(vs ...Category) predicate.Learning

CategoryNotIn applies the NotIn predicate on the "category" field.

func CategoryValidator

func CategoryValidator(c Category) error

CategoryValidator is a validator for the "category" field enum values. It is called by the builders before save.

func Confidence

func Confidence(v float64) predicate.Learning

Confidence applies equality check predicate on the "confidence" field. It's identical to ConfidenceEQ.

func ConfidenceEQ

func ConfidenceEQ(v float64) predicate.Learning

ConfidenceEQ applies the EQ predicate on the "confidence" field.

func ConfidenceGT

func ConfidenceGT(v float64) predicate.Learning

ConfidenceGT applies the GT predicate on the "confidence" field.

func ConfidenceGTE

func ConfidenceGTE(v float64) predicate.Learning

ConfidenceGTE applies the GTE predicate on the "confidence" field.

func ConfidenceIn

func ConfidenceIn(vs ...float64) predicate.Learning

ConfidenceIn applies the In predicate on the "confidence" field.

func ConfidenceLT

func ConfidenceLT(v float64) predicate.Learning

ConfidenceLT applies the LT predicate on the "confidence" field.

func ConfidenceLTE

func ConfidenceLTE(v float64) predicate.Learning

ConfidenceLTE applies the LTE predicate on the "confidence" field.

func ConfidenceNEQ

func ConfidenceNEQ(v float64) predicate.Learning

ConfidenceNEQ applies the NEQ predicate on the "confidence" field.

func ConfidenceNotIn

func ConfidenceNotIn(vs ...float64) predicate.Learning

ConfidenceNotIn applies the NotIn predicate on the "confidence" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Learning

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Learning

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Learning

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Learning

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Learning

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Learning

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Learning

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

func CreatedAtNotIn

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

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

func Diagnosis

func Diagnosis(v string) predicate.Learning

Diagnosis applies equality check predicate on the "diagnosis" field. It's identical to DiagnosisEQ.

func DiagnosisContains

func DiagnosisContains(v string) predicate.Learning

DiagnosisContains applies the Contains predicate on the "diagnosis" field.

func DiagnosisContainsFold

func DiagnosisContainsFold(v string) predicate.Learning

DiagnosisContainsFold applies the ContainsFold predicate on the "diagnosis" field.

func DiagnosisEQ

func DiagnosisEQ(v string) predicate.Learning

DiagnosisEQ applies the EQ predicate on the "diagnosis" field.

func DiagnosisEqualFold

func DiagnosisEqualFold(v string) predicate.Learning

DiagnosisEqualFold applies the EqualFold predicate on the "diagnosis" field.

func DiagnosisGT

func DiagnosisGT(v string) predicate.Learning

DiagnosisGT applies the GT predicate on the "diagnosis" field.

func DiagnosisGTE

func DiagnosisGTE(v string) predicate.Learning

DiagnosisGTE applies the GTE predicate on the "diagnosis" field.

func DiagnosisHasPrefix

func DiagnosisHasPrefix(v string) predicate.Learning

DiagnosisHasPrefix applies the HasPrefix predicate on the "diagnosis" field.

func DiagnosisHasSuffix

func DiagnosisHasSuffix(v string) predicate.Learning

DiagnosisHasSuffix applies the HasSuffix predicate on the "diagnosis" field.

func DiagnosisIn

func DiagnosisIn(vs ...string) predicate.Learning

DiagnosisIn applies the In predicate on the "diagnosis" field.

func DiagnosisIsNil

func DiagnosisIsNil() predicate.Learning

DiagnosisIsNil applies the IsNil predicate on the "diagnosis" field.

func DiagnosisLT

func DiagnosisLT(v string) predicate.Learning

DiagnosisLT applies the LT predicate on the "diagnosis" field.

func DiagnosisLTE

func DiagnosisLTE(v string) predicate.Learning

DiagnosisLTE applies the LTE predicate on the "diagnosis" field.

func DiagnosisNEQ

func DiagnosisNEQ(v string) predicate.Learning

DiagnosisNEQ applies the NEQ predicate on the "diagnosis" field.

func DiagnosisNotIn

func DiagnosisNotIn(vs ...string) predicate.Learning

DiagnosisNotIn applies the NotIn predicate on the "diagnosis" field.

func DiagnosisNotNil

func DiagnosisNotNil() predicate.Learning

DiagnosisNotNil applies the NotNil predicate on the "diagnosis" field.

func ErrorPattern

func ErrorPattern(v string) predicate.Learning

ErrorPattern applies equality check predicate on the "error_pattern" field. It's identical to ErrorPatternEQ.

func ErrorPatternContains

func ErrorPatternContains(v string) predicate.Learning

ErrorPatternContains applies the Contains predicate on the "error_pattern" field.

func ErrorPatternContainsFold

func ErrorPatternContainsFold(v string) predicate.Learning

ErrorPatternContainsFold applies the ContainsFold predicate on the "error_pattern" field.

func ErrorPatternEQ

func ErrorPatternEQ(v string) predicate.Learning

ErrorPatternEQ applies the EQ predicate on the "error_pattern" field.

func ErrorPatternEqualFold

func ErrorPatternEqualFold(v string) predicate.Learning

ErrorPatternEqualFold applies the EqualFold predicate on the "error_pattern" field.

func ErrorPatternGT

func ErrorPatternGT(v string) predicate.Learning

ErrorPatternGT applies the GT predicate on the "error_pattern" field.

func ErrorPatternGTE

func ErrorPatternGTE(v string) predicate.Learning

ErrorPatternGTE applies the GTE predicate on the "error_pattern" field.

func ErrorPatternHasPrefix

func ErrorPatternHasPrefix(v string) predicate.Learning

ErrorPatternHasPrefix applies the HasPrefix predicate on the "error_pattern" field.

func ErrorPatternHasSuffix

func ErrorPatternHasSuffix(v string) predicate.Learning

ErrorPatternHasSuffix applies the HasSuffix predicate on the "error_pattern" field.

func ErrorPatternIn

func ErrorPatternIn(vs ...string) predicate.Learning

ErrorPatternIn applies the In predicate on the "error_pattern" field.

func ErrorPatternIsNil

func ErrorPatternIsNil() predicate.Learning

ErrorPatternIsNil applies the IsNil predicate on the "error_pattern" field.

func ErrorPatternLT

func ErrorPatternLT(v string) predicate.Learning

ErrorPatternLT applies the LT predicate on the "error_pattern" field.

func ErrorPatternLTE

func ErrorPatternLTE(v string) predicate.Learning

ErrorPatternLTE applies the LTE predicate on the "error_pattern" field.

func ErrorPatternNEQ

func ErrorPatternNEQ(v string) predicate.Learning

ErrorPatternNEQ applies the NEQ predicate on the "error_pattern" field.

func ErrorPatternNotIn

func ErrorPatternNotIn(vs ...string) predicate.Learning

ErrorPatternNotIn applies the NotIn predicate on the "error_pattern" field.

func ErrorPatternNotNil

func ErrorPatternNotNil() predicate.Learning

ErrorPatternNotNil applies the NotNil predicate on the "error_pattern" field.

func Fix

func Fix(v string) predicate.Learning

Fix applies equality check predicate on the "fix" field. It's identical to FixEQ.

func FixContains

func FixContains(v string) predicate.Learning

FixContains applies the Contains predicate on the "fix" field.

func FixContainsFold

func FixContainsFold(v string) predicate.Learning

FixContainsFold applies the ContainsFold predicate on the "fix" field.

func FixEQ

func FixEQ(v string) predicate.Learning

FixEQ applies the EQ predicate on the "fix" field.

func FixEqualFold

func FixEqualFold(v string) predicate.Learning

FixEqualFold applies the EqualFold predicate on the "fix" field.

func FixGT

func FixGT(v string) predicate.Learning

FixGT applies the GT predicate on the "fix" field.

func FixGTE

func FixGTE(v string) predicate.Learning

FixGTE applies the GTE predicate on the "fix" field.

func FixHasPrefix

func FixHasPrefix(v string) predicate.Learning

FixHasPrefix applies the HasPrefix predicate on the "fix" field.

func FixHasSuffix

func FixHasSuffix(v string) predicate.Learning

FixHasSuffix applies the HasSuffix predicate on the "fix" field.

func FixIn

func FixIn(vs ...string) predicate.Learning

FixIn applies the In predicate on the "fix" field.

func FixIsNil

func FixIsNil() predicate.Learning

FixIsNil applies the IsNil predicate on the "fix" field.

func FixLT

func FixLT(v string) predicate.Learning

FixLT applies the LT predicate on the "fix" field.

func FixLTE

func FixLTE(v string) predicate.Learning

FixLTE applies the LTE predicate on the "fix" field.

func FixNEQ

func FixNEQ(v string) predicate.Learning

FixNEQ applies the NEQ predicate on the "fix" field.

func FixNotIn

func FixNotIn(vs ...string) predicate.Learning

FixNotIn applies the NotIn predicate on the "fix" field.

func FixNotNil

func FixNotNil() predicate.Learning

FixNotNil applies the NotNil predicate on the "fix" field.

func ID

func ID(id uuid.UUID) predicate.Learning

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Learning

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Learning

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Learning

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Learning

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Learning

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Learning

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func OccurrenceCount

func OccurrenceCount(v int) predicate.Learning

OccurrenceCount applies equality check predicate on the "occurrence_count" field. It's identical to OccurrenceCountEQ.

func OccurrenceCountEQ

func OccurrenceCountEQ(v int) predicate.Learning

OccurrenceCountEQ applies the EQ predicate on the "occurrence_count" field.

func OccurrenceCountGT

func OccurrenceCountGT(v int) predicate.Learning

OccurrenceCountGT applies the GT predicate on the "occurrence_count" field.

func OccurrenceCountGTE

func OccurrenceCountGTE(v int) predicate.Learning

OccurrenceCountGTE applies the GTE predicate on the "occurrence_count" field.

func OccurrenceCountIn

func OccurrenceCountIn(vs ...int) predicate.Learning

OccurrenceCountIn applies the In predicate on the "occurrence_count" field.

func OccurrenceCountLT

func OccurrenceCountLT(v int) predicate.Learning

OccurrenceCountLT applies the LT predicate on the "occurrence_count" field.

func OccurrenceCountLTE

func OccurrenceCountLTE(v int) predicate.Learning

OccurrenceCountLTE applies the LTE predicate on the "occurrence_count" field.

func OccurrenceCountNEQ

func OccurrenceCountNEQ(v int) predicate.Learning

OccurrenceCountNEQ applies the NEQ predicate on the "occurrence_count" field.

func OccurrenceCountNotIn

func OccurrenceCountNotIn(vs ...int) predicate.Learning

OccurrenceCountNotIn applies the NotIn predicate on the "occurrence_count" field.

func Or

func Or(predicates ...predicate.Learning) predicate.Learning

Or groups predicates with the OR operator between them.

func SuccessCount

func SuccessCount(v int) predicate.Learning

SuccessCount applies equality check predicate on the "success_count" field. It's identical to SuccessCountEQ.

func SuccessCountEQ

func SuccessCountEQ(v int) predicate.Learning

SuccessCountEQ applies the EQ predicate on the "success_count" field.

func SuccessCountGT

func SuccessCountGT(v int) predicate.Learning

SuccessCountGT applies the GT predicate on the "success_count" field.

func SuccessCountGTE

func SuccessCountGTE(v int) predicate.Learning

SuccessCountGTE applies the GTE predicate on the "success_count" field.

func SuccessCountIn

func SuccessCountIn(vs ...int) predicate.Learning

SuccessCountIn applies the In predicate on the "success_count" field.

func SuccessCountLT

func SuccessCountLT(v int) predicate.Learning

SuccessCountLT applies the LT predicate on the "success_count" field.

func SuccessCountLTE

func SuccessCountLTE(v int) predicate.Learning

SuccessCountLTE applies the LTE predicate on the "success_count" field.

func SuccessCountNEQ

func SuccessCountNEQ(v int) predicate.Learning

SuccessCountNEQ applies the NEQ predicate on the "success_count" field.

func SuccessCountNotIn

func SuccessCountNotIn(vs ...int) predicate.Learning

SuccessCountNotIn applies the NotIn predicate on the "success_count" field.

func TagsIsNil

func TagsIsNil() predicate.Learning

TagsIsNil applies the IsNil predicate on the "tags" field.

func TagsNotNil

func TagsNotNil() predicate.Learning

TagsNotNil applies the NotNil predicate on the "tags" field.

func Trigger

func Trigger(v string) predicate.Learning

Trigger applies equality check predicate on the "trigger" field. It's identical to TriggerEQ.

func TriggerContains

func TriggerContains(v string) predicate.Learning

TriggerContains applies the Contains predicate on the "trigger" field.

func TriggerContainsFold

func TriggerContainsFold(v string) predicate.Learning

TriggerContainsFold applies the ContainsFold predicate on the "trigger" field.

func TriggerEQ

func TriggerEQ(v string) predicate.Learning

TriggerEQ applies the EQ predicate on the "trigger" field.

func TriggerEqualFold

func TriggerEqualFold(v string) predicate.Learning

TriggerEqualFold applies the EqualFold predicate on the "trigger" field.

func TriggerGT

func TriggerGT(v string) predicate.Learning

TriggerGT applies the GT predicate on the "trigger" field.

func TriggerGTE

func TriggerGTE(v string) predicate.Learning

TriggerGTE applies the GTE predicate on the "trigger" field.

func TriggerHasPrefix

func TriggerHasPrefix(v string) predicate.Learning

TriggerHasPrefix applies the HasPrefix predicate on the "trigger" field.

func TriggerHasSuffix

func TriggerHasSuffix(v string) predicate.Learning

TriggerHasSuffix applies the HasSuffix predicate on the "trigger" field.

func TriggerIn

func TriggerIn(vs ...string) predicate.Learning

TriggerIn applies the In predicate on the "trigger" field.

func TriggerLT

func TriggerLT(v string) predicate.Learning

TriggerLT applies the LT predicate on the "trigger" field.

func TriggerLTE

func TriggerLTE(v string) predicate.Learning

TriggerLTE applies the LTE predicate on the "trigger" field.

func TriggerNEQ

func TriggerNEQ(v string) predicate.Learning

TriggerNEQ applies the NEQ predicate on the "trigger" field.

func TriggerNotIn

func TriggerNotIn(vs ...string) predicate.Learning

TriggerNotIn applies the NotIn predicate on the "trigger" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Learning

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Learning

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Learning

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Learning

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Learning

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Learning

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Learning

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn 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 Category

type Category string

Category defines the type for the "category" enum field.

const (
	CategoryToolError      Category = "tool_error"
	CategoryProviderError  Category = "provider_error"
	CategoryUserCorrection Category = "user_correction"
	CategoryTimeout        Category = "timeout"
	CategoryPermission     Category = "permission"
	CategoryGeneral        Category = "general"
)

Category values.

func (Category) String

func (c Category) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Learning queries.

func ByCategory

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

ByCategory orders the results by the category field.

func ByConfidence

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

ByConfidence orders the results by the confidence field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDiagnosis

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

ByDiagnosis orders the results by the diagnosis field.

func ByErrorPattern

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

ByErrorPattern orders the results by the error_pattern field.

func ByFix

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

ByFix orders the results by the fix field.

func ByID

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

ByID orders the results by the id field.

func ByOccurrenceCount

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

ByOccurrenceCount orders the results by the occurrence_count field.

func BySuccessCount

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

BySuccessCount orders the results by the success_count field.

func ByTrigger

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

ByTrigger orders the results by the trigger 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