Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Knowledge) predicate.Knowledge
- func CategoryEQ(v Category) predicate.Knowledge
- func CategoryIn(vs ...Category) predicate.Knowledge
- func CategoryNEQ(v Category) predicate.Knowledge
- func CategoryNotIn(vs ...Category) predicate.Knowledge
- func CategoryValidator(c Category) error
- func Content(v string) predicate.Knowledge
- func ContentContains(v string) predicate.Knowledge
- func ContentContainsFold(v string) predicate.Knowledge
- func ContentEQ(v string) predicate.Knowledge
- func ContentEqualFold(v string) predicate.Knowledge
- func ContentGT(v string) predicate.Knowledge
- func ContentGTE(v string) predicate.Knowledge
- func ContentHasPrefix(v string) predicate.Knowledge
- func ContentHasSuffix(v string) predicate.Knowledge
- func ContentIn(vs ...string) predicate.Knowledge
- func ContentLT(v string) predicate.Knowledge
- func ContentLTE(v string) predicate.Knowledge
- func ContentNEQ(v string) predicate.Knowledge
- func ContentNotIn(vs ...string) predicate.Knowledge
- func CreatedAt(v time.Time) predicate.Knowledge
- func CreatedAtEQ(v time.Time) predicate.Knowledge
- func CreatedAtGT(v time.Time) predicate.Knowledge
- func CreatedAtGTE(v time.Time) predicate.Knowledge
- func CreatedAtIn(vs ...time.Time) predicate.Knowledge
- func CreatedAtLT(v time.Time) predicate.Knowledge
- func CreatedAtLTE(v time.Time) predicate.Knowledge
- func CreatedAtNEQ(v time.Time) predicate.Knowledge
- func CreatedAtNotIn(vs ...time.Time) predicate.Knowledge
- func ID(id uuid.UUID) predicate.Knowledge
- func IDEQ(id uuid.UUID) predicate.Knowledge
- func IDGT(id uuid.UUID) predicate.Knowledge
- func IDGTE(id uuid.UUID) predicate.Knowledge
- func IDIn(ids ...uuid.UUID) predicate.Knowledge
- func IDLT(id uuid.UUID) predicate.Knowledge
- func IDLTE(id uuid.UUID) predicate.Knowledge
- func IDNEQ(id uuid.UUID) predicate.Knowledge
- func IDNotIn(ids ...uuid.UUID) predicate.Knowledge
- func Key(v string) predicate.Knowledge
- func KeyContains(v string) predicate.Knowledge
- func KeyContainsFold(v string) predicate.Knowledge
- func KeyEQ(v string) predicate.Knowledge
- func KeyEqualFold(v string) predicate.Knowledge
- func KeyGT(v string) predicate.Knowledge
- func KeyGTE(v string) predicate.Knowledge
- func KeyHasPrefix(v string) predicate.Knowledge
- func KeyHasSuffix(v string) predicate.Knowledge
- func KeyIn(vs ...string) predicate.Knowledge
- func KeyLT(v string) predicate.Knowledge
- func KeyLTE(v string) predicate.Knowledge
- func KeyNEQ(v string) predicate.Knowledge
- func KeyNotIn(vs ...string) predicate.Knowledge
- func Not(p predicate.Knowledge) predicate.Knowledge
- func Or(predicates ...predicate.Knowledge) predicate.Knowledge
- func RelevanceScore(v float64) predicate.Knowledge
- func RelevanceScoreEQ(v float64) predicate.Knowledge
- func RelevanceScoreGT(v float64) predicate.Knowledge
- func RelevanceScoreGTE(v float64) predicate.Knowledge
- func RelevanceScoreIn(vs ...float64) predicate.Knowledge
- func RelevanceScoreLT(v float64) predicate.Knowledge
- func RelevanceScoreLTE(v float64) predicate.Knowledge
- func RelevanceScoreNEQ(v float64) predicate.Knowledge
- func RelevanceScoreNotIn(vs ...float64) predicate.Knowledge
- func Source(v string) predicate.Knowledge
- func SourceContains(v string) predicate.Knowledge
- func SourceContainsFold(v string) predicate.Knowledge
- func SourceEQ(v string) predicate.Knowledge
- func SourceEqualFold(v string) predicate.Knowledge
- func SourceGT(v string) predicate.Knowledge
- func SourceGTE(v string) predicate.Knowledge
- func SourceHasPrefix(v string) predicate.Knowledge
- func SourceHasSuffix(v string) predicate.Knowledge
- func SourceIn(vs ...string) predicate.Knowledge
- func SourceIsNil() predicate.Knowledge
- func SourceLT(v string) predicate.Knowledge
- func SourceLTE(v string) predicate.Knowledge
- func SourceNEQ(v string) predicate.Knowledge
- func SourceNotIn(vs ...string) predicate.Knowledge
- func SourceNotNil() predicate.Knowledge
- func TagsIsNil() predicate.Knowledge
- func TagsNotNil() predicate.Knowledge
- func UpdatedAt(v time.Time) predicate.Knowledge
- func UpdatedAtEQ(v time.Time) predicate.Knowledge
- func UpdatedAtGT(v time.Time) predicate.Knowledge
- func UpdatedAtGTE(v time.Time) predicate.Knowledge
- func UpdatedAtIn(vs ...time.Time) predicate.Knowledge
- func UpdatedAtLT(v time.Time) predicate.Knowledge
- func UpdatedAtLTE(v time.Time) predicate.Knowledge
- func UpdatedAtNEQ(v time.Time) predicate.Knowledge
- func UpdatedAtNotIn(vs ...time.Time) predicate.Knowledge
- func UseCount(v int) predicate.Knowledge
- func UseCountEQ(v int) predicate.Knowledge
- func UseCountGT(v int) predicate.Knowledge
- func UseCountGTE(v int) predicate.Knowledge
- func UseCountIn(vs ...int) predicate.Knowledge
- func UseCountLT(v int) predicate.Knowledge
- func UseCountLTE(v int) predicate.Knowledge
- func UseCountNEQ(v int) predicate.Knowledge
- func UseCountNotIn(vs ...int) predicate.Knowledge
- func ValidColumn(column string) bool
- type Category
- type OrderOption
- func ByCategory(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKey(opts ...sql.OrderTermOption) OrderOption
- func ByRelevanceScore(opts ...sql.OrderTermOption) OrderOption
- func BySource(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUseCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the knowledge type in the database. Label = "knowledge" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldKey holds the string denoting the key field in the database. FieldKey = "key" // FieldCategory holds the string denoting the category field in the database. FieldCategory = "category" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldTags holds the string denoting the tags field in the database. FieldTags = "tags" // FieldSource holds the string denoting the source field in the database. FieldSource = "source" // FieldUseCount holds the string denoting the use_count field in the database. FieldUseCount = "use_count" // FieldRelevanceScore holds the string denoting the relevance_score field in the database. FieldRelevanceScore = "relevance_score" // 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 knowledge in the database. Table = "knowledges" )
Variables ¶
var ( // KeyValidator is a validator for the "key" field. It is called by the builders before save. KeyValidator func(string) error // ContentValidator is a validator for the "content" field. It is called by the builders before save. ContentValidator func(string) error // DefaultUseCount holds the default value on creation for the "use_count" field. DefaultUseCount int // DefaultRelevanceScore holds the default value on creation for the "relevance_score" field. DefaultRelevanceScore 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 )
var Columns = []string{ FieldID, FieldKey, FieldCategory, FieldContent, FieldTags, FieldSource, FieldUseCount, FieldRelevanceScore, FieldCreatedAt, FieldUpdatedAt, }
Columns holds all SQL columns for knowledge fields.
Functions ¶
func CategoryEQ ¶
CategoryEQ applies the EQ predicate on the "category" field.
func CategoryIn ¶
CategoryIn applies the In predicate on the "category" field.
func CategoryNEQ ¶
CategoryNEQ applies the NEQ predicate on the "category" field.
func CategoryNotIn ¶
CategoryNotIn applies the NotIn predicate on the "category" field.
func CategoryValidator ¶
CategoryValidator is a validator for the "category" field enum values. It is called by the builders before save.
func Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func KeyContains ¶
KeyContains applies the Contains predicate on the "key" field.
func KeyContainsFold ¶
KeyContainsFold applies the ContainsFold predicate on the "key" field.
func KeyEqualFold ¶
KeyEqualFold applies the EqualFold predicate on the "key" field.
func KeyHasPrefix ¶
KeyHasPrefix applies the HasPrefix predicate on the "key" field.
func KeyHasSuffix ¶
KeyHasSuffix applies the HasSuffix predicate on the "key" field.
func RelevanceScore ¶
RelevanceScore applies equality check predicate on the "relevance_score" field. It's identical to RelevanceScoreEQ.
func RelevanceScoreEQ ¶
RelevanceScoreEQ applies the EQ predicate on the "relevance_score" field.
func RelevanceScoreGT ¶
RelevanceScoreGT applies the GT predicate on the "relevance_score" field.
func RelevanceScoreGTE ¶
RelevanceScoreGTE applies the GTE predicate on the "relevance_score" field.
func RelevanceScoreIn ¶
RelevanceScoreIn applies the In predicate on the "relevance_score" field.
func RelevanceScoreLT ¶
RelevanceScoreLT applies the LT predicate on the "relevance_score" field.
func RelevanceScoreLTE ¶
RelevanceScoreLTE applies the LTE predicate on the "relevance_score" field.
func RelevanceScoreNEQ ¶
RelevanceScoreNEQ applies the NEQ predicate on the "relevance_score" field.
func RelevanceScoreNotIn ¶
RelevanceScoreNotIn applies the NotIn predicate on the "relevance_score" field.
func Source ¶
Source applies equality check predicate on the "source" field. It's identical to SourceEQ.
func SourceContains ¶
SourceContains applies the Contains predicate on the "source" field.
func SourceContainsFold ¶
SourceContainsFold applies the ContainsFold predicate on the "source" field.
func SourceEqualFold ¶
SourceEqualFold applies the EqualFold predicate on the "source" field.
func SourceHasPrefix ¶
SourceHasPrefix applies the HasPrefix predicate on the "source" field.
func SourceHasSuffix ¶
SourceHasSuffix applies the HasSuffix predicate on the "source" field.
func SourceIsNil ¶
SourceIsNil applies the IsNil predicate on the "source" field.
func SourceNotIn ¶
SourceNotIn applies the NotIn predicate on the "source" field.
func SourceNotNil ¶
SourceNotNil applies the NotNil predicate on the "source" field.
func TagsNotNil ¶
TagsNotNil applies the NotNil predicate on the "tags" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UseCount ¶
UseCount applies equality check predicate on the "use_count" field. It's identical to UseCountEQ.
func UseCountEQ ¶
UseCountEQ applies the EQ predicate on the "use_count" field.
func UseCountGT ¶
UseCountGT applies the GT predicate on the "use_count" field.
func UseCountGTE ¶
UseCountGTE applies the GTE predicate on the "use_count" field.
func UseCountIn ¶
UseCountIn applies the In predicate on the "use_count" field.
func UseCountLT ¶
UseCountLT applies the LT predicate on the "use_count" field.
func UseCountLTE ¶
UseCountLTE applies the LTE predicate on the "use_count" field.
func UseCountNEQ ¶
UseCountNEQ applies the NEQ predicate on the "use_count" field.
func UseCountNotIn ¶
UseCountNotIn applies the NotIn predicate on the "use_count" field.
func ValidColumn ¶
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.
type OrderOption ¶
OrderOption defines the ordering options for the Knowledge queries.
func ByCategory ¶
func ByCategory(opts ...sql.OrderTermOption) OrderOption
ByCategory orders the results by the category field.
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 ByKey ¶
func ByKey(opts ...sql.OrderTermOption) OrderOption
ByKey orders the results by the key field.
func ByRelevanceScore ¶
func ByRelevanceScore(opts ...sql.OrderTermOption) OrderOption
ByRelevanceScore orders the results by the relevance_score field.
func BySource ¶
func BySource(opts ...sql.OrderTermOption) OrderOption
BySource orders the results by the source field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUseCount ¶
func ByUseCount(opts ...sql.OrderTermOption) OrderOption
ByUseCount orders the results by the use_count field.