dep upgrade, regenerate

This commit is contained in:
2025-02-06 09:31:49 +01:00
parent 2c11283b4b
commit 2750cadc8b
50 changed files with 3936 additions and 7429 deletions

View File

@ -1,9 +1,12 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package logentry
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
@ -67,3 +70,64 @@ var (
// DefaultTimestamp holds the default value on creation for the "timestamp" field.
DefaultTimestamp func() time.Time
)
// OrderOption defines the ordering options for the Logentry 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()
}
// ByTimestamp orders the results by the timestamp field.
func ByTimestamp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTimestamp, opts...).ToFunc()
}
// ByAction orders the results by the action field.
func ByAction(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAction, opts...).ToFunc()
}
// ByData orders the results by the data field.
func ByData(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldData, opts...).ToFunc()
}
// ByAccountID orders the results by the account_id field.
func ByAccountID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAccountID, opts...).ToFunc()
}
// ByDomainID orders the results by the domain_id field.
func ByDomainID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDomainID, opts...).ToFunc()
}
// ByAccountField orders the results by account field.
func ByAccountField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAccountStep(), sql.OrderByField(field, opts...))
}
}
// ByDomainField orders the results by domain field.
func ByDomainField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newDomainStep(), sql.OrderByField(field, opts...))
}
}
func newAccountStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AccountInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn),
)
}
func newDomainStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DomainInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, DomainTable, DomainColumn),
)
}

View File

@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package logentry
@ -12,556 +12,312 @@ import (
// ID filters vertices based on their ID field.
func ID(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(ids) == 0 {
s.Where(sql.False())
return
}
v := make([]interface{}, len(ids))
for i := range v {
v[i] = ids[i]
}
s.Where(sql.In(s.C(FieldID), v...))
})
return predicate.Logentry(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(ids) == 0 {
s.Where(sql.False())
return
}
v := make([]interface{}, len(ids))
for i := range v {
v[i] = ids[i]
}
s.Where(sql.NotIn(s.C(FieldID), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldID), id))
})
return predicate.Logentry(sql.FieldLTE(FieldID, id))
}
// Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.
func Timestamp(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldEQ(FieldTimestamp, v))
}
// Action applies equality check predicate on the "action" field. It's identical to ActionEQ.
func Action(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldEQ(FieldAction, v))
}
// Data applies equality check predicate on the "data" field. It's identical to DataEQ.
func Data(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldEQ(FieldData, v))
}
// AccountID applies equality check predicate on the "account_id" field. It's identical to AccountIDEQ.
func AccountID(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAccountID), v))
})
return predicate.Logentry(sql.FieldEQ(FieldAccountID, v))
}
// DomainID applies equality check predicate on the "domain_id" field. It's identical to DomainIDEQ.
func DomainID(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDomainID), v))
})
return predicate.Logentry(sql.FieldEQ(FieldDomainID, v))
}
// TimestampEQ applies the EQ predicate on the "timestamp" field.
func TimestampEQ(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldEQ(FieldTimestamp, v))
}
// TimestampNEQ applies the NEQ predicate on the "timestamp" field.
func TimestampNEQ(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldNEQ(FieldTimestamp, v))
}
// TimestampIn applies the In predicate on the "timestamp" field.
func TimestampIn(vs ...time.Time) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldTimestamp), v...))
})
return predicate.Logentry(sql.FieldIn(FieldTimestamp, vs...))
}
// TimestampNotIn applies the NotIn predicate on the "timestamp" field.
func TimestampNotIn(vs ...time.Time) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldTimestamp), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldTimestamp, vs...))
}
// TimestampGT applies the GT predicate on the "timestamp" field.
func TimestampGT(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldGT(FieldTimestamp, v))
}
// TimestampGTE applies the GTE predicate on the "timestamp" field.
func TimestampGTE(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldGTE(FieldTimestamp, v))
}
// TimestampLT applies the LT predicate on the "timestamp" field.
func TimestampLT(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldLT(FieldTimestamp, v))
}
// TimestampLTE applies the LTE predicate on the "timestamp" field.
func TimestampLTE(v time.Time) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldTimestamp), v))
})
return predicate.Logentry(sql.FieldLTE(FieldTimestamp, v))
}
// ActionEQ applies the EQ predicate on the "action" field.
func ActionEQ(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldEQ(FieldAction, v))
}
// ActionNEQ applies the NEQ predicate on the "action" field.
func ActionNEQ(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldNEQ(FieldAction, v))
}
// ActionIn applies the In predicate on the "action" field.
func ActionIn(vs ...string) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldAction), v...))
})
return predicate.Logentry(sql.FieldIn(FieldAction, vs...))
}
// ActionNotIn applies the NotIn predicate on the "action" field.
func ActionNotIn(vs ...string) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldAction), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldAction, vs...))
}
// ActionGT applies the GT predicate on the "action" field.
func ActionGT(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldGT(FieldAction, v))
}
// ActionGTE applies the GTE predicate on the "action" field.
func ActionGTE(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldGTE(FieldAction, v))
}
// ActionLT applies the LT predicate on the "action" field.
func ActionLT(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldLT(FieldAction, v))
}
// ActionLTE applies the LTE predicate on the "action" field.
func ActionLTE(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldLTE(FieldAction, v))
}
// ActionContains applies the Contains predicate on the "action" field.
func ActionContains(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldContains(FieldAction, v))
}
// ActionHasPrefix applies the HasPrefix predicate on the "action" field.
func ActionHasPrefix(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldHasPrefix(FieldAction, v))
}
// ActionHasSuffix applies the HasSuffix predicate on the "action" field.
func ActionHasSuffix(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldHasSuffix(FieldAction, v))
}
// ActionEqualFold applies the EqualFold predicate on the "action" field.
func ActionEqualFold(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldEqualFold(FieldAction, v))
}
// ActionContainsFold applies the ContainsFold predicate on the "action" field.
func ActionContainsFold(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldAction), v))
})
return predicate.Logentry(sql.FieldContainsFold(FieldAction, v))
}
// DataEQ applies the EQ predicate on the "data" field.
func DataEQ(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldEQ(FieldData, v))
}
// DataNEQ applies the NEQ predicate on the "data" field.
func DataNEQ(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldNEQ(FieldData, v))
}
// DataIn applies the In predicate on the "data" field.
func DataIn(vs ...string) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldData), v...))
})
return predicate.Logentry(sql.FieldIn(FieldData, vs...))
}
// DataNotIn applies the NotIn predicate on the "data" field.
func DataNotIn(vs ...string) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldData), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldData, vs...))
}
// DataGT applies the GT predicate on the "data" field.
func DataGT(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldGT(FieldData, v))
}
// DataGTE applies the GTE predicate on the "data" field.
func DataGTE(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldGTE(FieldData, v))
}
// DataLT applies the LT predicate on the "data" field.
func DataLT(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldLT(FieldData, v))
}
// DataLTE applies the LTE predicate on the "data" field.
func DataLTE(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldLTE(FieldData, v))
}
// DataContains applies the Contains predicate on the "data" field.
func DataContains(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldContains(FieldData, v))
}
// DataHasPrefix applies the HasPrefix predicate on the "data" field.
func DataHasPrefix(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldHasPrefix(FieldData, v))
}
// DataHasSuffix applies the HasSuffix predicate on the "data" field.
func DataHasSuffix(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldHasSuffix(FieldData, v))
}
// DataIsNil applies the IsNil predicate on the "data" field.
func DataIsNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldData)))
})
return predicate.Logentry(sql.FieldIsNull(FieldData))
}
// DataNotNil applies the NotNil predicate on the "data" field.
func DataNotNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldData)))
})
return predicate.Logentry(sql.FieldNotNull(FieldData))
}
// DataEqualFold applies the EqualFold predicate on the "data" field.
func DataEqualFold(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldEqualFold(FieldData, v))
}
// DataContainsFold applies the ContainsFold predicate on the "data" field.
func DataContainsFold(v string) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldData), v))
})
return predicate.Logentry(sql.FieldContainsFold(FieldData, v))
}
// AccountIDEQ applies the EQ predicate on the "account_id" field.
func AccountIDEQ(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAccountID), v))
})
return predicate.Logentry(sql.FieldEQ(FieldAccountID, v))
}
// AccountIDNEQ applies the NEQ predicate on the "account_id" field.
func AccountIDNEQ(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldAccountID), v))
})
return predicate.Logentry(sql.FieldNEQ(FieldAccountID, v))
}
// AccountIDIn applies the In predicate on the "account_id" field.
func AccountIDIn(vs ...int64) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldAccountID), v...))
})
return predicate.Logentry(sql.FieldIn(FieldAccountID, vs...))
}
// AccountIDNotIn applies the NotIn predicate on the "account_id" field.
func AccountIDNotIn(vs ...int64) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldAccountID), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldAccountID, vs...))
}
// AccountIDIsNil applies the IsNil predicate on the "account_id" field.
func AccountIDIsNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldAccountID)))
})
return predicate.Logentry(sql.FieldIsNull(FieldAccountID))
}
// AccountIDNotNil applies the NotNil predicate on the "account_id" field.
func AccountIDNotNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldAccountID)))
})
return predicate.Logentry(sql.FieldNotNull(FieldAccountID))
}
// DomainIDEQ applies the EQ predicate on the "domain_id" field.
func DomainIDEQ(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDomainID), v))
})
return predicate.Logentry(sql.FieldEQ(FieldDomainID, v))
}
// DomainIDNEQ applies the NEQ predicate on the "domain_id" field.
func DomainIDNEQ(v int64) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldDomainID), v))
})
return predicate.Logentry(sql.FieldNEQ(FieldDomainID, v))
}
// DomainIDIn applies the In predicate on the "domain_id" field.
func DomainIDIn(vs ...int64) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldDomainID), v...))
})
return predicate.Logentry(sql.FieldIn(FieldDomainID, vs...))
}
// DomainIDNotIn applies the NotIn predicate on the "domain_id" field.
func DomainIDNotIn(vs ...int64) predicate.Logentry {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Logentry(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldDomainID), v...))
})
return predicate.Logentry(sql.FieldNotIn(FieldDomainID, vs...))
}
// DomainIDIsNil applies the IsNil predicate on the "domain_id" field.
func DomainIDIsNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldDomainID)))
})
return predicate.Logentry(sql.FieldIsNull(FieldDomainID))
}
// DomainIDNotNil applies the NotNil predicate on the "domain_id" field.
func DomainIDNotNil() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldDomainID)))
})
return predicate.Logentry(sql.FieldNotNull(FieldDomainID))
}
// HasAccount applies the HasEdge predicate on the "account" edge.
@ -569,7 +325,6 @@ func HasAccount() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AccountTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn),
)
sqlgraph.HasNeighbors(s, step)
@ -579,11 +334,7 @@ func HasAccount() predicate.Logentry {
// HasAccountWith applies the HasEdge predicate on the "account" edge with a given conditions (other predicates).
func HasAccountWith(preds ...predicate.Account) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AccountInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn),
)
step := newAccountStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@ -597,7 +348,6 @@ func HasDomain() predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DomainTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, DomainTable, DomainColumn),
)
sqlgraph.HasNeighbors(s, step)
@ -607,11 +357,7 @@ func HasDomain() predicate.Logentry {
// HasDomainWith applies the HasEdge predicate on the "domain" edge with a given conditions (other predicates).
func HasDomainWith(preds ...predicate.Domain) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DomainInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, DomainTable, DomainColumn),
)
step := newDomainStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@ -622,32 +368,15 @@ func HasDomainWith(preds ...predicate.Domain) predicate.Logentry {
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Logentry) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s1 := s.Clone().SetP(nil)
for _, p := range predicates {
p(s1)
}
s.Where(s1.P())
})
return predicate.Logentry(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Logentry) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
s1 := s.Clone().SetP(nil)
for i, p := range predicates {
if i > 0 {
s1.Or()
}
p(s1)
}
s.Where(s1.P())
})
return predicate.Logentry(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Logentry) predicate.Logentry {
return predicate.Logentry(func(s *sql.Selector) {
p(s.Not())
})
return predicate.Logentry(sql.NotPredicates(p))
}