observation

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the observation type in the database.
	Label = "observation"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSessionKey holds the string denoting the session_key field in the database.
	FieldSessionKey = "session_key"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldTokenCount holds the string denoting the token_count field in the database.
	FieldTokenCount = "token_count"
	// FieldSourceStartIndex holds the string denoting the source_start_index field in the database.
	FieldSourceStartIndex = "source_start_index"
	// FieldSourceEndIndex holds the string denoting the source_end_index field in the database.
	FieldSourceEndIndex = "source_end_index"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// Table holds the table name of the observation in the database.
	Table = "observations"
)

Variables

View Source
var (
	// SessionKeyValidator is a validator for the "session_key" field. It is called by the builders before save.
	SessionKeyValidator func(string) error
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DefaultTokenCount holds the default value on creation for the "token_count" field.
	DefaultTokenCount int
	// DefaultSourceStartIndex holds the default value on creation for the "source_start_index" field.
	DefaultSourceStartIndex int
	// DefaultSourceEndIndex holds the default value on creation for the "source_end_index" field.
	DefaultSourceEndIndex int
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for observation fields.

Functions

func And

func And(predicates ...predicate.Observation) predicate.Observation

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Observation

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Observation

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Observation

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Observation

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Observation

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Observation

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Observation

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Observation

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Observation

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Observation

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Observation

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Observation

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Observation

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Observation

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Observation

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Observation

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Observation

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Observation

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Observation

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Observation

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Observation

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

func CreatedAtNotIn

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

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Observation

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Observation

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Observation

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Observation

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Observation

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Observation

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func SessionKey

func SessionKey(v string) predicate.Observation

SessionKey applies equality check predicate on the "session_key" field. It's identical to SessionKeyEQ.

func SessionKeyContains

func SessionKeyContains(v string) predicate.Observation

SessionKeyContains applies the Contains predicate on the "session_key" field.

func SessionKeyContainsFold

func SessionKeyContainsFold(v string) predicate.Observation

SessionKeyContainsFold applies the ContainsFold predicate on the "session_key" field.

func SessionKeyEQ

func SessionKeyEQ(v string) predicate.Observation

SessionKeyEQ applies the EQ predicate on the "session_key" field.

func SessionKeyEqualFold

func SessionKeyEqualFold(v string) predicate.Observation

SessionKeyEqualFold applies the EqualFold predicate on the "session_key" field.

func SessionKeyGT

func SessionKeyGT(v string) predicate.Observation

SessionKeyGT applies the GT predicate on the "session_key" field.

func SessionKeyGTE

func SessionKeyGTE(v string) predicate.Observation

SessionKeyGTE applies the GTE predicate on the "session_key" field.

func SessionKeyHasPrefix

func SessionKeyHasPrefix(v string) predicate.Observation

SessionKeyHasPrefix applies the HasPrefix predicate on the "session_key" field.

func SessionKeyHasSuffix

func SessionKeyHasSuffix(v string) predicate.Observation

SessionKeyHasSuffix applies the HasSuffix predicate on the "session_key" field.

func SessionKeyIn

func SessionKeyIn(vs ...string) predicate.Observation

SessionKeyIn applies the In predicate on the "session_key" field.

func SessionKeyLT

func SessionKeyLT(v string) predicate.Observation

SessionKeyLT applies the LT predicate on the "session_key" field.

func SessionKeyLTE

func SessionKeyLTE(v string) predicate.Observation

SessionKeyLTE applies the LTE predicate on the "session_key" field.

func SessionKeyNEQ

func SessionKeyNEQ(v string) predicate.Observation

SessionKeyNEQ applies the NEQ predicate on the "session_key" field.

func SessionKeyNotIn

func SessionKeyNotIn(vs ...string) predicate.Observation

SessionKeyNotIn applies the NotIn predicate on the "session_key" field.

func SourceEndIndex

func SourceEndIndex(v int) predicate.Observation

SourceEndIndex applies equality check predicate on the "source_end_index" field. It's identical to SourceEndIndexEQ.

func SourceEndIndexEQ

func SourceEndIndexEQ(v int) predicate.Observation

SourceEndIndexEQ applies the EQ predicate on the "source_end_index" field.

func SourceEndIndexGT

func SourceEndIndexGT(v int) predicate.Observation

SourceEndIndexGT applies the GT predicate on the "source_end_index" field.

func SourceEndIndexGTE

func SourceEndIndexGTE(v int) predicate.Observation

SourceEndIndexGTE applies the GTE predicate on the "source_end_index" field.

func SourceEndIndexIn

func SourceEndIndexIn(vs ...int) predicate.Observation

SourceEndIndexIn applies the In predicate on the "source_end_index" field.

func SourceEndIndexLT

func SourceEndIndexLT(v int) predicate.Observation

SourceEndIndexLT applies the LT predicate on the "source_end_index" field.

func SourceEndIndexLTE

func SourceEndIndexLTE(v int) predicate.Observation

SourceEndIndexLTE applies the LTE predicate on the "source_end_index" field.

func SourceEndIndexNEQ

func SourceEndIndexNEQ(v int) predicate.Observation

SourceEndIndexNEQ applies the NEQ predicate on the "source_end_index" field.

func SourceEndIndexNotIn

func SourceEndIndexNotIn(vs ...int) predicate.Observation

SourceEndIndexNotIn applies the NotIn predicate on the "source_end_index" field.

func SourceStartIndex

func SourceStartIndex(v int) predicate.Observation

SourceStartIndex applies equality check predicate on the "source_start_index" field. It's identical to SourceStartIndexEQ.

func SourceStartIndexEQ

func SourceStartIndexEQ(v int) predicate.Observation

SourceStartIndexEQ applies the EQ predicate on the "source_start_index" field.

func SourceStartIndexGT

func SourceStartIndexGT(v int) predicate.Observation

SourceStartIndexGT applies the GT predicate on the "source_start_index" field.

func SourceStartIndexGTE

func SourceStartIndexGTE(v int) predicate.Observation

SourceStartIndexGTE applies the GTE predicate on the "source_start_index" field.

func SourceStartIndexIn

func SourceStartIndexIn(vs ...int) predicate.Observation

SourceStartIndexIn applies the In predicate on the "source_start_index" field.

func SourceStartIndexLT

func SourceStartIndexLT(v int) predicate.Observation

SourceStartIndexLT applies the LT predicate on the "source_start_index" field.

func SourceStartIndexLTE

func SourceStartIndexLTE(v int) predicate.Observation

SourceStartIndexLTE applies the LTE predicate on the "source_start_index" field.

func SourceStartIndexNEQ

func SourceStartIndexNEQ(v int) predicate.Observation

SourceStartIndexNEQ applies the NEQ predicate on the "source_start_index" field.

func SourceStartIndexNotIn

func SourceStartIndexNotIn(vs ...int) predicate.Observation

SourceStartIndexNotIn applies the NotIn predicate on the "source_start_index" field.

func TokenCount

func TokenCount(v int) predicate.Observation

TokenCount applies equality check predicate on the "token_count" field. It's identical to TokenCountEQ.

func TokenCountEQ

func TokenCountEQ(v int) predicate.Observation

TokenCountEQ applies the EQ predicate on the "token_count" field.

func TokenCountGT

func TokenCountGT(v int) predicate.Observation

TokenCountGT applies the GT predicate on the "token_count" field.

func TokenCountGTE

func TokenCountGTE(v int) predicate.Observation

TokenCountGTE applies the GTE predicate on the "token_count" field.

func TokenCountIn

func TokenCountIn(vs ...int) predicate.Observation

TokenCountIn applies the In predicate on the "token_count" field.

func TokenCountLT

func TokenCountLT(v int) predicate.Observation

TokenCountLT applies the LT predicate on the "token_count" field.

func TokenCountLTE

func TokenCountLTE(v int) predicate.Observation

TokenCountLTE applies the LTE predicate on the "token_count" field.

func TokenCountNEQ

func TokenCountNEQ(v int) predicate.Observation

TokenCountNEQ applies the NEQ predicate on the "token_count" field.

func TokenCountNotIn

func TokenCountNotIn(vs ...int) predicate.Observation

TokenCountNotIn applies the NotIn predicate on the "token_count" 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 Observation queries.

func ByContent

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

ByContent orders the results by the content field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func BySessionKey

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

BySessionKey orders the results by the session_key field.

func BySourceEndIndex

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

BySourceEndIndex orders the results by the source_end_index field.

func BySourceStartIndex

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

BySourceStartIndex orders the results by the source_start_index field.

func ByTokenCount

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

ByTokenCount orders the results by the token_count field.

Jump to

Keyboard shortcuts

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