🚧 Refactor basic services
This commit is contained in:
118
internal/models/ent/keybinding/keybinding.go
Normal file
118
internal/models/ent/keybinding/keybinding.go
Normal file
@@ -0,0 +1,118 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package keybinding
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the keybinding type in the database.
|
||||
Label = "key_binding"
|
||||
// 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"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// FieldKey holds the string denoting the key field in the database.
|
||||
FieldKey = "key"
|
||||
// FieldCommand holds the string denoting the command field in the database.
|
||||
FieldCommand = "command"
|
||||
// FieldExtension holds the string denoting the extension field in the database.
|
||||
FieldExtension = "extension"
|
||||
// FieldEnabled holds the string denoting the enabled field in the database.
|
||||
FieldEnabled = "enabled"
|
||||
// Table holds the table name of the keybinding in the database.
|
||||
Table = "key_bindings"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for keybinding fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldKey,
|
||||
FieldCommand,
|
||||
FieldExtension,
|
||||
FieldEnabled,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 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 _ "voidraft/internal/models/ent/runtime"
|
||||
var (
|
||||
Hooks [2]ent.Hook
|
||||
Interceptors [1]ent.Interceptor
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() string
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() string
|
||||
// KeyValidator is a validator for the "key" field. It is called by the builders before save.
|
||||
KeyValidator func(string) error
|
||||
// CommandValidator is a validator for the "command" field. It is called by the builders before save.
|
||||
CommandValidator func(string) error
|
||||
// ExtensionValidator is a validator for the "extension" field. It is called by the builders before save.
|
||||
ExtensionValidator func(string) error
|
||||
// DefaultEnabled holds the default value on creation for the "enabled" field.
|
||||
DefaultEnabled bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the KeyBinding queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByKey orders the results by the key field.
|
||||
func ByKey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldKey, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCommand orders the results by the command field.
|
||||
func ByCommand(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCommand, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByExtension orders the results by the extension field.
|
||||
func ByExtension(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldExtension, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEnabled orders the results by the enabled field.
|
||||
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEnabled, opts...).ToFunc()
|
||||
}
|
||||
524
internal/models/ent/keybinding/where.go
Normal file
524
internal/models/ent/keybinding/where.go
Normal file
@@ -0,0 +1,524 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package keybinding
|
||||
|
||||
import (
|
||||
"voidraft/internal/models/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// Key applies equality check predicate on the "key" field. It's identical to KeyEQ.
|
||||
func Key(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldKey, v))
|
||||
}
|
||||
|
||||
// Command applies equality check predicate on the "command" field. It's identical to CommandEQ.
|
||||
func Command(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldCommand, v))
|
||||
}
|
||||
|
||||
// Extension applies equality check predicate on the "extension" field. It's identical to ExtensionEQ.
|
||||
func Extension(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldExtension, v))
|
||||
}
|
||||
|
||||
// Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
|
||||
func Enabled(v bool) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldEnabled, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtContains applies the Contains predicate on the "created_at" field.
|
||||
func CreatedAtContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtHasPrefix applies the HasPrefix predicate on the "created_at" field.
|
||||
func CreatedAtHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtHasSuffix applies the HasSuffix predicate on the "created_at" field.
|
||||
func CreatedAtHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtEqualFold applies the EqualFold predicate on the "created_at" field.
|
||||
func CreatedAtEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtContainsFold applies the ContainsFold predicate on the "created_at" field.
|
||||
func CreatedAtContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtContains applies the Contains predicate on the "updated_at" field.
|
||||
func UpdatedAtContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtHasPrefix applies the HasPrefix predicate on the "updated_at" field.
|
||||
func UpdatedAtHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtHasSuffix applies the HasSuffix predicate on the "updated_at" field.
|
||||
func UpdatedAtHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEqualFold applies the EqualFold predicate on the "updated_at" field.
|
||||
func UpdatedAtEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtContainsFold applies the ContainsFold predicate on the "updated_at" field.
|
||||
func UpdatedAtContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtContains applies the Contains predicate on the "deleted_at" field.
|
||||
func DeletedAtContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtHasPrefix applies the HasPrefix predicate on the "deleted_at" field.
|
||||
func DeletedAtHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtHasSuffix applies the HasSuffix predicate on the "deleted_at" field.
|
||||
func DeletedAtHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtEqualFold applies the EqualFold predicate on the "deleted_at" field.
|
||||
func DeletedAtEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtContainsFold applies the ContainsFold predicate on the "deleted_at" field.
|
||||
func DeletedAtContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// KeyEQ applies the EQ predicate on the "key" field.
|
||||
func KeyEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyNEQ applies the NEQ predicate on the "key" field.
|
||||
func KeyNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyIn applies the In predicate on the "key" field.
|
||||
func KeyIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldKey, vs...))
|
||||
}
|
||||
|
||||
// KeyNotIn applies the NotIn predicate on the "key" field.
|
||||
func KeyNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldKey, vs...))
|
||||
}
|
||||
|
||||
// KeyGT applies the GT predicate on the "key" field.
|
||||
func KeyGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyGTE applies the GTE predicate on the "key" field.
|
||||
func KeyGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyLT applies the LT predicate on the "key" field.
|
||||
func KeyLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyLTE applies the LTE predicate on the "key" field.
|
||||
func KeyLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyContains applies the Contains predicate on the "key" field.
|
||||
func KeyContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyHasPrefix applies the HasPrefix predicate on the "key" field.
|
||||
func KeyHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyHasSuffix applies the HasSuffix predicate on the "key" field.
|
||||
func KeyHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyEqualFold applies the EqualFold predicate on the "key" field.
|
||||
func KeyEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldKey, v))
|
||||
}
|
||||
|
||||
// KeyContainsFold applies the ContainsFold predicate on the "key" field.
|
||||
func KeyContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldKey, v))
|
||||
}
|
||||
|
||||
// CommandEQ applies the EQ predicate on the "command" field.
|
||||
func CommandEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandNEQ applies the NEQ predicate on the "command" field.
|
||||
func CommandNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandIn applies the In predicate on the "command" field.
|
||||
func CommandIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldCommand, vs...))
|
||||
}
|
||||
|
||||
// CommandNotIn applies the NotIn predicate on the "command" field.
|
||||
func CommandNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldCommand, vs...))
|
||||
}
|
||||
|
||||
// CommandGT applies the GT predicate on the "command" field.
|
||||
func CommandGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandGTE applies the GTE predicate on the "command" field.
|
||||
func CommandGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandLT applies the LT predicate on the "command" field.
|
||||
func CommandLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandLTE applies the LTE predicate on the "command" field.
|
||||
func CommandLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandContains applies the Contains predicate on the "command" field.
|
||||
func CommandContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandHasPrefix applies the HasPrefix predicate on the "command" field.
|
||||
func CommandHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandHasSuffix applies the HasSuffix predicate on the "command" field.
|
||||
func CommandHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandEqualFold applies the EqualFold predicate on the "command" field.
|
||||
func CommandEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldCommand, v))
|
||||
}
|
||||
|
||||
// CommandContainsFold applies the ContainsFold predicate on the "command" field.
|
||||
func CommandContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldCommand, v))
|
||||
}
|
||||
|
||||
// ExtensionEQ applies the EQ predicate on the "extension" field.
|
||||
func ExtensionEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionNEQ applies the NEQ predicate on the "extension" field.
|
||||
func ExtensionNEQ(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionIn applies the In predicate on the "extension" field.
|
||||
func ExtensionIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIn(FieldExtension, vs...))
|
||||
}
|
||||
|
||||
// ExtensionNotIn applies the NotIn predicate on the "extension" field.
|
||||
func ExtensionNotIn(vs ...string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotIn(FieldExtension, vs...))
|
||||
}
|
||||
|
||||
// ExtensionGT applies the GT predicate on the "extension" field.
|
||||
func ExtensionGT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGT(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionGTE applies the GTE predicate on the "extension" field.
|
||||
func ExtensionGTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldGTE(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionLT applies the LT predicate on the "extension" field.
|
||||
func ExtensionLT(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLT(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionLTE applies the LTE predicate on the "extension" field.
|
||||
func ExtensionLTE(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldLTE(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionContains applies the Contains predicate on the "extension" field.
|
||||
func ExtensionContains(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContains(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionHasPrefix applies the HasPrefix predicate on the "extension" field.
|
||||
func ExtensionHasPrefix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasPrefix(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionHasSuffix applies the HasSuffix predicate on the "extension" field.
|
||||
func ExtensionHasSuffix(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldHasSuffix(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionIsNil applies the IsNil predicate on the "extension" field.
|
||||
func ExtensionIsNil() predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldIsNull(FieldExtension))
|
||||
}
|
||||
|
||||
// ExtensionNotNil applies the NotNil predicate on the "extension" field.
|
||||
func ExtensionNotNil() predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNotNull(FieldExtension))
|
||||
}
|
||||
|
||||
// ExtensionEqualFold applies the EqualFold predicate on the "extension" field.
|
||||
func ExtensionEqualFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEqualFold(FieldExtension, v))
|
||||
}
|
||||
|
||||
// ExtensionContainsFold applies the ContainsFold predicate on the "extension" field.
|
||||
func ExtensionContainsFold(v string) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldContainsFold(FieldExtension, v))
|
||||
}
|
||||
|
||||
// EnabledEQ applies the EQ predicate on the "enabled" field.
|
||||
func EnabledEQ(v bool) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldEQ(FieldEnabled, v))
|
||||
}
|
||||
|
||||
// EnabledNEQ applies the NEQ predicate on the "enabled" field.
|
||||
func EnabledNEQ(v bool) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.FieldNEQ(FieldEnabled, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.KeyBinding) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.KeyBinding) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.KeyBinding) predicate.KeyBinding {
|
||||
return predicate.KeyBinding(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user